diff --git a/apis/firestore/v1alpha1/doc.go b/apis/firestore/v1alpha1/doc.go new file mode 100644 index 0000000000..73fb6530df --- /dev/null +++ b/apis/firestore/v1alpha1/doc.go @@ -0,0 +1,16 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// +kcc:proto=google.firestore.admin.v1 +package v1alpha1 diff --git a/apis/firestore/v1alpha1/firestoredatabase_types.go b/apis/firestore/v1alpha1/firestoredatabase_types.go new file mode 100644 index 0000000000..bc3c66b1a5 --- /dev/null +++ b/apis/firestore/v1alpha1/firestoredatabase_types.go @@ -0,0 +1,152 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +import ( + "github.com/GoogleCloudPlatform/k8s-config-connector/apis/refs/v1beta1" + "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/apis/k8s/v1alpha1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +var FirestoreDatabaseGVK = GroupVersion.WithKind("FirestoreDatabase") + +// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! +// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. + +// FirestoreDatabaseSpec defines the desired state of FirestoreDatabase +// +kcc:proto=google.firestore.admin.v1.Database +type FirestoreDatabaseSpec struct { + // Immutable. The Project that this resource belongs to. + ProjectRef v1beta1.ProjectRef `json:"projectRef"` + + // The FirestoreDatabase name. If not given, the metadata.name will be used. + // + optional + ResourceID *string `json:"resourceID,omitempty"` + + // The location of the database. Available locations are listed at + // https://cloud.google.com/firestore/docs/locations. + LocationID *string `json:"locationID,omitempty"` + + // The concurrency control mode to use for this database. + // See https://cloud.google.com/firestore/docs/reference/rest/v1/projects.databases#concurrencymode for more info. + ConcurrencyMode *string `json:"concurrencyMode,omitempty"` + + // Whether to enable the PITR feature on this database. + // See https://cloud.google.com/firestore/docs/reference/rest/v1/projects.databases#pointintimerecoveryenablement for more info. + PointInTimeRecoveryEnablement *string `json:"pointInTimeRecoveryEnablement,omitempty"` +} + +// FirestoreDatabaseStatus defines the config connector machine state of FirestoreDatabase +type FirestoreDatabaseStatus struct { + /* Conditions represent the latest available observations of the + object's current state. */ + Conditions []v1alpha1.Condition `json:"conditions,omitempty"` + + // ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource. + // +optional + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + + // A unique specifier for the FirestoreDatabase resource in GCP. + // +optional + ExternalRef *string `json:"externalRef,omitempty"` + + // ObservedState is the state of the resource as most recently observed in GCP. + // +optional + ObservedState *FirestoreDatabaseObservedState `json:"observedState,omitempty"` +} + +// FirestoreDatabaseSpec defines the desired state of FirestoreDatabase +// +kcc:proto=google.firestore.admin.v1.Database +type FirestoreDatabaseObservedState struct { + // Output only. The system-generated UUID4 for this Database. + Uid *string `json:"uid,omitempty"` + + // Output only. The timestamp at which this database was created. Databases + // created before 2016 do not populate create_time. + CreateTime *string `json:"createTime,omitempty"` + + // Output only. The timestamp at which this database was most recently + // updated. Note this only includes updates to the database resource and not + // data contained by the database. + UpdateTime *string `json:"updateTime,omitempty"` + + // Output only. The period during which past versions of data are retained in + // the database. + // + // Any [read][google.firestore.v1.GetDocumentRequest.read_time] + // or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify + // a `read_time` within this window, and will read the state of the database + // at that time. + // + // If the PITR feature is enabled, the retention period is 7 days. Otherwise, + // the retention period is 1 hour. + VersionRetentionPeriod *string `json:"versionRetentionPeriod,omitempty"` + + // Output only. The earliest timestamp at which older versions of the data can + // be read from the database. See [version_retention_period] above; this field + // is populated with `now - version_retention_period`. + // + // This value is continuously updated, and becomes stale the moment it is + // queried. If you are using this value to recover data, make sure to account + // for the time from the moment when the value is queried to the moment when + // you initiate the recovery. + EarliestVersionTime *string `json:"earliestVersionTime,omitempty"` + + // Output only. The key_prefix for this database. This key_prefix is used, in + // combination with the project id ("~") to construct + // the application id that is returned from the Cloud Datastore APIs in Google + // App Engine first generation runtimes. + // + // This value may be empty in which case the appid to use for URL-encoded keys + // is the project_id (eg: foo instead of v~foo). + KeyPrefix *string `json:"keyPrefix,omitempty"` + + // This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + Etag *string `json:"etag,omitempty"` +} + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:resource:categories=gcp +// +kubebuilder:subresource:status +// +kubebuilder:metadata:labels="cnrm.cloud.google.com/managed-by-kcc=true";"cnrm.cloud.google.com/system=true" +// +kubebuilder:printcolumn:name="Age",JSONPath=".metadata.creationTimestamp",type="date" +// +kubebuilder:printcolumn:name="Ready",JSONPath=".status.conditions[?(@.type=='Ready')].status",type="string",description="When 'True', the most recent reconcile of the resource succeeded" +// +kubebuilder:printcolumn:name="Status",JSONPath=".status.conditions[?(@.type=='Ready')].reason",type="string",description="The reason for the value in 'Ready'" +// +kubebuilder:printcolumn:name="Status Age",JSONPath=".status.conditions[?(@.type=='Ready')].lastTransitionTime",type="date",description="The last transition time for the value in 'Status'" + +// FirestoreDatabase is the Schema for the FirestoreDatabase API +// +k8s:openapi-gen=true +type FirestoreDatabase struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec FirestoreDatabaseSpec `json:"spec,omitempty"` + Status FirestoreDatabaseStatus `json:"status,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// FirestoreDatabaseList contains a list of FirestoreDatabase +type FirestoreDatabaseList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []FirestoreDatabase `json:"items"` +} + +func init() { + SchemeBuilder.Register(&FirestoreDatabase{}, &FirestoreDatabaseList{}) +} diff --git a/apis/firestore/v1alpha1/groupversion_info.go b/apis/firestore/v1alpha1/groupversion_info.go new file mode 100644 index 0000000000..87e86dd9ce --- /dev/null +++ b/apis/firestore/v1alpha1/groupversion_info.go @@ -0,0 +1,33 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// +kubebuilder:object:generate=true +// +groupName=firestore.cnrm.cloud.google.com +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects + GroupVersion = schema.GroupVersion{Group: "firestore.cnrm.cloud.google.com", Version: "v1alpha1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/apis/firestore/v1alpha1/types.generated.go b/apis/firestore/v1alpha1/types.generated.go new file mode 100644 index 0000000000..b3f9464a3e --- /dev/null +++ b/apis/firestore/v1alpha1/types.generated.go @@ -0,0 +1,93 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package v1alpha1 + +/* +// +kcc:proto=google.firestore.admin.v1.Database +type Database struct { + // The resource name of the Database. + // Format: `projects/{project}/databases/{database}` + Name *string `json:"name,omitempty"` + + // Output only. The system-generated UUID4 for this Database. + Uid *string `json:"uid,omitempty"` + + // Output only. The timestamp at which this database was created. Databases + // created before 2016 do not populate create_time. + CreateTime *string `json:"createTime,omitempty"` + + // Output only. The timestamp at which this database was most recently + // updated. Note this only includes updates to the database resource and not + // data contained by the database. + UpdateTime *string `json:"updateTime,omitempty"` + + // The location of the database. Available locations are listed at + // https://cloud.google.com/firestore/docs/locations. + LocationID *string `json:"locationID,omitempty"` + + // The type of the database. + // See https://cloud.google.com/datastore/docs/firestore-or-datastore for + // information about how to choose. + Type *string `json:"type,omitempty"` + + // The concurrency control mode to use for this database. + ConcurrencyMode *string `json:"concurrencyMode,omitempty"` + + // Output only. The period during which past versions of data are retained in + // the database. + // + // Any [read][google.firestore.v1.GetDocumentRequest.read_time] + // or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify + // a `read_time` within this window, and will read the state of the database + // at that time. + // + // If the PITR feature is enabled, the retention period is 7 days. Otherwise, + // the retention period is 1 hour. + VersionRetentionPeriod *string `json:"versionRetentionPeriod,omitempty"` + + // Output only. The earliest timestamp at which older versions of the data can + // be read from the database. See [version_retention_period] above; this field + // is populated with `now - version_retention_period`. + // + // This value is continuously updated, and becomes stale the moment it is + // queried. If you are using this value to recover data, make sure to account + // for the time from the moment when the value is queried to the moment when + // you initiate the recovery. + EarliestVersionTime *string `json:"earliestVersionTime,omitempty"` + + // Whether to enable the PITR feature on this database. + PointInTimeRecoveryEnablement *string `json:"pointInTimeRecoveryEnablement,omitempty"` + + // The App Engine integration mode to use for this database. + AppEngineIntegrationMode *string `json:"appEngineIntegrationMode,omitempty"` + + // Output only. The key_prefix for this database. This key_prefix is used, in + // combination with the project id ("~") to construct + // the application id that is returned from the Cloud Datastore APIs in Google + // App Engine first generation runtimes. + // + // This value may be empty in which case the appid to use for URL-encoded keys + // is the project_id (eg: foo instead of v~foo). + KeyPrefix *string `json:"keyPrefix,omitempty"` + + // State of delete protection for the database. + DeleteProtectionState *string `json:"deleteProtectionState,omitempty"` + + // This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + Etag *string `json:"etag,omitempty"` +} +*/ diff --git a/apis/firestore/v1alpha1/zz_generated.deepcopy.go b/apis/firestore/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 0000000000..a91a0ea697 --- /dev/null +++ b/apis/firestore/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,190 @@ +//go:build !ignore_autogenerated + +// Code generated by controller-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + k8sv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/apis/k8s/v1alpha1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FirestoreDatabase) DeepCopyInto(out *FirestoreDatabase) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FirestoreDatabase. +func (in *FirestoreDatabase) DeepCopy() *FirestoreDatabase { + if in == nil { + return nil + } + out := new(FirestoreDatabase) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *FirestoreDatabase) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FirestoreDatabaseList) DeepCopyInto(out *FirestoreDatabaseList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]FirestoreDatabase, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FirestoreDatabaseList. +func (in *FirestoreDatabaseList) DeepCopy() *FirestoreDatabaseList { + if in == nil { + return nil + } + out := new(FirestoreDatabaseList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *FirestoreDatabaseList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FirestoreDatabaseObservedState) DeepCopyInto(out *FirestoreDatabaseObservedState) { + *out = *in + if in.Uid != nil { + in, out := &in.Uid, &out.Uid + *out = new(string) + **out = **in + } + if in.CreateTime != nil { + in, out := &in.CreateTime, &out.CreateTime + *out = new(string) + **out = **in + } + if in.UpdateTime != nil { + in, out := &in.UpdateTime, &out.UpdateTime + *out = new(string) + **out = **in + } + if in.VersionRetentionPeriod != nil { + in, out := &in.VersionRetentionPeriod, &out.VersionRetentionPeriod + *out = new(string) + **out = **in + } + if in.EarliestVersionTime != nil { + in, out := &in.EarliestVersionTime, &out.EarliestVersionTime + *out = new(string) + **out = **in + } + if in.KeyPrefix != nil { + in, out := &in.KeyPrefix, &out.KeyPrefix + *out = new(string) + **out = **in + } + if in.Etag != nil { + in, out := &in.Etag, &out.Etag + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FirestoreDatabaseObservedState. +func (in *FirestoreDatabaseObservedState) DeepCopy() *FirestoreDatabaseObservedState { + if in == nil { + return nil + } + out := new(FirestoreDatabaseObservedState) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FirestoreDatabaseSpec) DeepCopyInto(out *FirestoreDatabaseSpec) { + *out = *in + out.ProjectRef = in.ProjectRef + if in.ResourceID != nil { + in, out := &in.ResourceID, &out.ResourceID + *out = new(string) + **out = **in + } + if in.LocationID != nil { + in, out := &in.LocationID, &out.LocationID + *out = new(string) + **out = **in + } + if in.ConcurrencyMode != nil { + in, out := &in.ConcurrencyMode, &out.ConcurrencyMode + *out = new(string) + **out = **in + } + if in.PointInTimeRecoveryEnablement != nil { + in, out := &in.PointInTimeRecoveryEnablement, &out.PointInTimeRecoveryEnablement + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FirestoreDatabaseSpec. +func (in *FirestoreDatabaseSpec) DeepCopy() *FirestoreDatabaseSpec { + if in == nil { + return nil + } + out := new(FirestoreDatabaseSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FirestoreDatabaseStatus) DeepCopyInto(out *FirestoreDatabaseStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]k8sv1alpha1.Condition, len(*in)) + copy(*out, *in) + } + if in.ObservedGeneration != nil { + in, out := &in.ObservedGeneration, &out.ObservedGeneration + *out = new(int64) + **out = **in + } + if in.ExternalRef != nil { + in, out := &in.ExternalRef, &out.ExternalRef + *out = new(string) + **out = **in + } + if in.ObservedState != nil { + in, out := &in.ObservedState, &out.ObservedState + *out = new(FirestoreDatabaseObservedState) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FirestoreDatabaseStatus. +func (in *FirestoreDatabaseStatus) DeepCopy() *FirestoreDatabaseStatus { + if in == nil { + return nil + } + out := new(FirestoreDatabaseStatus) + in.DeepCopyInto(out) + return out +} diff --git a/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_firestoredatabases.firestore.cnrm.cloud.google.com.yaml b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_firestoredatabases.firestore.cnrm.cloud.google.com.yaml new file mode 100644 index 0000000000..835ca394ef --- /dev/null +++ b/config/crds/resources/apiextensions.k8s.io_v1_customresourcedefinition_firestoredatabases.firestore.cnrm.cloud.google.com.yaml @@ -0,0 +1,217 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + cnrm.cloud.google.com/version: 0.0.0-dev + creationTimestamp: null + labels: + cnrm.cloud.google.com/managed-by-kcc: "true" + cnrm.cloud.google.com/system: "true" + name: firestoredatabases.firestore.cnrm.cloud.google.com +spec: + group: firestore.cnrm.cloud.google.com + names: + categories: + - gcp + kind: FirestoreDatabase + listKind: FirestoreDatabaseList + plural: firestoredatabases + singular: firestoredatabase + preserveUnknownFields: false + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - description: When 'True', the most recent reconcile of the resource succeeded + jsonPath: .status.conditions[?(@.type=='Ready')].status + name: Ready + type: string + - description: The reason for the value in 'Ready' + jsonPath: .status.conditions[?(@.type=='Ready')].reason + name: Status + type: string + - description: The last transition time for the value in 'Status' + jsonPath: .status.conditions[?(@.type=='Ready')].lastTransitionTime + name: Status Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: FirestoreDatabase is the Schema for the FirestoreDatabase API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: FirestoreDatabaseSpec defines the desired state of FirestoreDatabase + properties: + concurrencyMode: + description: The concurrency control mode to use for this database. + See https://cloud.google.com/firestore/docs/reference/rest/v1/projects.databases#concurrencymode + for more info. + type: string + locationID: + description: The location of the database. Available locations are + listed at https://cloud.google.com/firestore/docs/locations. + type: string + pointInTimeRecoveryEnablement: + description: Whether to enable the PITR feature on this database. + See https://cloud.google.com/firestore/docs/reference/rest/v1/projects.databases#pointintimerecoveryenablement + for more info. + type: string + projectRef: + description: Immutable. The Project that this resource belongs to. + oneOf: + - not: + required: + - external + required: + - name + - not: + anyOf: + - required: + - name + - required: + - namespace + required: + - external + properties: + external: + description: The `projectID` field of a project, when not managed + by KCC. + type: string + kind: + description: The kind of the Project resource; optional but must + be `Project` if provided. + type: string + name: + description: The `name` field of a `Project` resource. + type: string + namespace: + description: The `namespace` field of a `Project` resource. + type: string + type: object + resourceID: + description: The FirestoreDatabase name. If not given, the metadata.name + will be used. + type: string + required: + - projectRef + type: object + status: + description: FirestoreDatabaseStatus defines the config connector machine + state of FirestoreDatabase + properties: + conditions: + description: Conditions represent the latest available observations + of the object's current state. + items: + properties: + lastTransitionTime: + description: Last time the condition transitioned from one status + to another. + type: string + message: + description: Human-readable message indicating details about + last transition. + type: string + reason: + description: Unique, one-word, CamelCase reason for the condition's + last transition. + type: string + status: + description: Status is the status of the condition. Can be True, + False, Unknown. + type: string + type: + description: Type is the type of the condition. + type: string + type: object + type: array + externalRef: + description: A unique specifier for the FirestoreDatabase resource + in GCP. + type: string + observedGeneration: + description: ObservedGeneration is the generation of the resource + that was most recently observed by the Config Connector controller. + If this is equal to metadata.generation, then that means that the + current reported status reflects the most recent desired state of + the resource. + format: int64 + type: integer + observedState: + description: ObservedState is the state of the resource as most recently + observed in GCP. + properties: + createTime: + description: Output only. The timestamp at which this database + was created. Databases created before 2016 do not populate create_time. + type: string + earliestVersionTime: + description: |- + Output only. The earliest timestamp at which older versions of the data can + be read from the database. See [version_retention_period] above; this field + is populated with `now - version_retention_period`. + + This value is continuously updated, and becomes stale the moment it is + queried. If you are using this value to recover data, make sure to account + for the time from the moment when the value is queried to the moment when + you initiate the recovery. + type: string + etag: + description: This checksum is computed by the server based on + the value of other fields, and may be sent on update and delete + requests to ensure the client has an up-to-date value before + proceeding. + type: string + keyPrefix: + description: |- + Output only. The key_prefix for this database. This key_prefix is used, in + combination with the project id ("~") to construct + the application id that is returned from the Cloud Datastore APIs in Google + App Engine first generation runtimes. + + This value may be empty in which case the appid to use for URL-encoded keys + is the project_id (eg: foo instead of v~foo). + type: string + uid: + description: Output only. The system-generated UUID4 for this + Database. + type: string + updateTime: + description: Output only. The timestamp at which this database + was most recently updated. Note this only includes updates to + the database resource and not data contained by the database. + type: string + versionRetentionPeriod: + description: |- + Output only. The period during which past versions of data are retained in + the database. + + Any [read][google.firestore.v1.GetDocumentRequest.read_time] + or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify + a `read_time` within this window, and will read the state of the database + at that time. + + If the PITR feature is enabled, the retention period is 7 days. Otherwise, + the retention period is 1 hour. + type: string + type: object + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/config/tests/samples/create/harness.go b/config/tests/samples/create/harness.go index 78b812a20a..29fa623ee5 100644 --- a/config/tests/samples/create/harness.go +++ b/config/tests/samples/create/harness.go @@ -698,6 +698,8 @@ func MaybeSkip(t *testing.T, name string, resources []*unstructured.Unstructured case schema.GroupKind{Group: "edgenetwork.cnrm.cloud.google.com", Kind: "EdgeNetworkNetwork"}: case schema.GroupKind{Group: "edgenetwork.cnrm.cloud.google.com", Kind: "EdgeNetworkSubnet"}: + case schema.GroupKind{Group: "firestore.cnrm.cloud.google.com", Kind: "FirestoreDatabase"}: + case schema.GroupKind{Group: "kms.cnrm.cloud.google.com", Kind: "KMSKeyRing"}: case schema.GroupKind{Group: "kms.cnrm.cloud.google.com", Kind: "KMSCryptoKey"}: diff --git a/dev/tools/controllerbuilder/generate.sh b/dev/tools/controllerbuilder/generate.sh index cb84b76cf1..fa5dddb028 100755 --- a/dev/tools/controllerbuilder/generate.sh +++ b/dev/tools/controllerbuilder/generate.sh @@ -118,6 +118,23 @@ go run . generate-types \ --output-api ${APIS_DIR} \ --kind BigQueryDataTransferConfig \ --proto-resource TransferConfig + +# Firestore +go run . generate-types \ + --proto-source-path ../proto-to-mapper/build/googleapis.pb \ + --service google.firestore.admin.v1 \ + --api-version firestore.cnrm.cloud.google.com/v1alpha1 \ + --output-api ${APIS_DIR} \ + --kind FirestoreDatabase \ + --proto-resource Database + +go run . generate-mapper \ + --proto-source-path ../proto-to-mapper/build/googleapis.pb \ + --service google.firestore.admin.v1 \ + --api-version firestore.cnrm.cloud.google.com/v1alpha1 \ + --api-go-package-path github.com/GoogleCloudPlatform/k8s-config-connector/apis \ + --output-dir ${OUTPUT_MAPPER} \ + --api-dir ${APIS_DIR} go run . generate-mapper \ --proto-source-path ../proto-to-mapper/build/googleapis.pb \ diff --git a/dev/tools/proto-to-mapper/Makefile b/dev/tools/proto-to-mapper/Makefile index f1710cfb37..f878dee2a3 100644 --- a/dev/tools/proto-to-mapper/Makefile +++ b/dev/tools/proto-to-mapper/Makefile @@ -17,6 +17,7 @@ generate-pb: install-protoc-linux ./third_party/googleapis/google/cloud/*/*/*.proto \ ./third_party/googleapis/google/cloud/*/*/*/*.proto \ ./third_party/googleapis/google/dataflow/*/*.proto \ + ./third_party/googleapis/google/firestore/admin/v1/*.proto \ ./third_party/googleapis/google/iam/v1/*.proto \ ./third_party/googleapis/google/logging/v2/*.proto \ ./third_party/googleapis/google/monitoring/v3/*.proto \ diff --git a/go.mod b/go.mod index 83ecc1666d..725874c12c 100644 --- a/go.mod +++ b/go.mod @@ -13,6 +13,7 @@ require ( cloud.google.com/go/compute v1.28.0 cloud.google.com/go/dataflow v0.10.0 cloud.google.com/go/dataform v0.10.0 + cloud.google.com/go/firestore v1.16.0 cloud.google.com/go/iam v1.2.0 cloud.google.com/go/monitoring v1.21.0 cloud.google.com/go/profiler v0.4.1 diff --git a/go.sum b/go.sum index fcd4d8e715..dc3e7258ab 100644 --- a/go.sum +++ b/go.sum @@ -53,6 +53,8 @@ cloud.google.com/go/dataform v0.10.0/go.mod h1:0NKefI6v1ppBEDnwrp6gOMEA3s/RH3ypL cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/firestore v1.16.0 h1:YwmDHcyrxVRErWcgxunzEaZxtNbc8QoFYA/JOEwDPgc= +cloud.google.com/go/firestore v1.16.0/go.mod h1:+22v/7p+WNBSQwdSwP57vz47aZiY+HrDkrOsJNhk7rg= cloud.google.com/go/iam v1.2.0 h1:kZKMKVNk/IsSSc/udOb83K0hL/Yh/Gcqpz+oAkoIFN8= cloud.google.com/go/iam v1.2.0/go.mod h1:zITGuWgsLZxd8OwAlX+eMFgZDXzBm7icj1PVTYG766Q= cloud.google.com/go/longrunning v0.6.0 h1:mM1ZmaNsQsnb+5n1DNPeL0KwQd9jQRqSqSDEkBZr+aI= diff --git a/mockgcp/Makefile b/mockgcp/Makefile index 03ec0cdad7..563bfefadf 100644 --- a/mockgcp/Makefile +++ b/mockgcp/Makefile @@ -52,14 +52,8 @@ gen-proto-no-fixup: ./apis/mockgcp/cloud/resourcemanager/v1/*.proto \ ./apis/mockgcp/storage/v1/*.proto \ ./third_party/googleapis/mockgcp/api/apikeys/v2/*.proto \ - ./third_party/googleapis/mockgcp/devtools/artifactregistry/v1/*.proto \ - ./third_party/googleapis/mockgcp/devtools/cloudbuild/v1/*.proto \ - ./third_party/googleapis/mockgcp/dataflow/v1beta3/*.proto \ - ./third_party/googleapis/mockgcp/iam/admin/v1/*.proto \ - ./third_party/googleapis/mockgcp/logging/v2/*.proto \ - ./third_party/googleapis/mockgcp/pubsub/v1/*.proto \ - ./third_party/googleapis/mockgcp/spanner/admin/database/v1/*.proto \ - ./third_party/googleapis/mockgcp/spanner/admin/instance/v1/*.proto \ + ./third_party/googleapis/mockgcp/api/serviceusage/v1/*.proto \ + ./third_party/googleapis/mockgcp/api/serviceusage/v1beta1/*.proto \ ./third_party/googleapis/mockgcp/cloud/aiplatform/v1beta1/annotation*.proto \ ./third_party/googleapis/mockgcp/cloud/aiplatform/v1beta1/data_item.proto \ ./third_party/googleapis/mockgcp/cloud/aiplatform/v1beta1/dataset*.proto \ @@ -68,37 +62,44 @@ gen-proto-no-fixup: ./third_party/googleapis/mockgcp/cloud/aiplatform/v1beta1/operation.proto \ ./third_party/googleapis/mockgcp/cloud/aiplatform/v1beta1/saved_query.proto \ ./third_party/googleapis/mockgcp/cloud/aiplatform/v1beta1/tensorboard*.proto \ - ./third_party/googleapis/mockgcp/cloud/alloydb/v1beta/*.proto \ ./third_party/googleapis/mockgcp/cloud/aiplatform/v1beta1/user_action_reference.proto \ - ./third_party/googleapis/mockgcp/cloud/billing/v1/*.proto \ + ./third_party/googleapis/mockgcp/cloud/alloydb/v1beta/*.proto \ ./third_party/googleapis/mockgcp/cloud/bigquery/connection/v1/*.proto \ + ./third_party/googleapis/mockgcp/cloud/billing/v1/*.proto \ ./third_party/googleapis/mockgcp/cloud/certificatemanager/v1/*.proto \ ./third_party/googleapis/mockgcp/cloud/common/*.proto \ ./third_party/googleapis/mockgcp/cloud/compute/v1/*.proto \ - ./third_party/googleapis/mockgcp/cloud/gkemulticloud/v1/*.proto \ ./third_party/googleapis/mockgcp/cloud/edgecontainer/v1/*.proto \ ./third_party/googleapis/mockgcp/cloud/edgenetwork/v1/*.proto \ ./third_party/googleapis/mockgcp/cloud/functions/v1/*.proto \ + ./third_party/googleapis/mockgcp/cloud/gkehub/v1beta/*.proto \ + ./third_party/googleapis/mockgcp/cloud/gkehub/v1beta/configmanagement/*.proto \ + ./third_party/googleapis/mockgcp/cloud/gkehub/v1beta/metering/*.proto \ + ./third_party/googleapis/mockgcp/cloud/gkehub/v1beta/multiclusteringress/*.proto \ + ./third_party/googleapis/mockgcp/cloud/gkehub/v1beta1/membership.proto \ + ./third_party/googleapis/mockgcp/cloud/gkemulticloud/v1/*.proto \ ./third_party/googleapis/mockgcp/cloud/kms/v1/*.proto \ ./third_party/googleapis/mockgcp/cloud/networkservices/v1/*.proto \ + ./third_party/googleapis/mockgcp/cloud/privilegedaccessmanager/v1/*.proto \ ./third_party/googleapis/mockgcp/cloud/pubsublite/v1/*.proto \ - ./third_party/googleapis/mockgcp/cloud/redis/v1beta1/*.proto \ ./third_party/googleapis/mockgcp/cloud/redis/cluster/v1/*.proto \ + ./third_party/googleapis/mockgcp/cloud/redis/v1beta1/*.proto \ ./third_party/googleapis/mockgcp/cloud/resourcemanager/v3/*.proto \ - ./third_party/googleapis/mockgcp/cloud/security/privateca/v1/*.proto \ - ./third_party/googleapis/mockgcp/cloud/privilegedaccessmanager/v1/*.proto \ ./third_party/googleapis/mockgcp/cloud/secretmanager/v1/*.proto \ + ./third_party/googleapis/mockgcp/cloud/security/privateca/v1/*.proto \ ./third_party/googleapis/mockgcp/cloud/sql/v1beta4/*.proto \ ./third_party/googleapis/mockgcp/container/v1beta1/*.proto \ - ./third_party/googleapis/mockgcp/monitoring/v3/*.proto \ + ./third_party/googleapis/mockgcp/dataflow/v1beta3/*.proto \ + ./third_party/googleapis/mockgcp/devtools/artifactregistry/v1/*.proto \ + ./third_party/googleapis/mockgcp/devtools/cloudbuild/v1/*.proto \ + ./third_party/googleapis/mockgcp/firestore/admin/v1/*.proto \ + ./third_party/googleapis/mockgcp/iam/admin/v1/*.proto \ + ./third_party/googleapis/mockgcp/logging/v2/*.proto \ ./third_party/googleapis/mockgcp/monitoring/dashboard/v1/*.proto \ - ./third_party/googleapis/mockgcp/api/serviceusage/v1/*.proto \ - ./third_party/googleapis/mockgcp/api/serviceusage/v1beta1/*.proto \ - ./third_party/googleapis/mockgcp/cloud/gkehub/v1beta/*.proto \ - ./third_party/googleapis/mockgcp/cloud/gkehub/v1beta/configmanagement/*.proto \ - ./third_party/googleapis/mockgcp/cloud/gkehub/v1beta/metering/*.proto \ - ./third_party/googleapis/mockgcp/cloud/gkehub/v1beta/multiclusteringress/*.proto \ - ./third_party/googleapis/mockgcp/cloud/gkehub/v1beta1/membership.proto \ + ./third_party/googleapis/mockgcp/monitoring/v3/*.proto \ + ./third_party/googleapis/mockgcp/pubsub/v1/*.proto \ + ./third_party/googleapis/mockgcp/spanner/admin/database/v1/*.proto \ + ./third_party/googleapis/mockgcp/spanner/admin/instance/v1/*.proto \ ./third_party/googleapis/mockgrafeas/v1/*.proto diff --git a/mockgcp/fixup-third-party.sh b/mockgcp/fixup-third-party.sh index dcc21e6a15..8bfda210b3 100755 --- a/mockgcp/fixup-third-party.sh +++ b/mockgcp/fixup-third-party.sh @@ -26,6 +26,7 @@ rm -rf mockgcp/ && mkdir -p mockgcp/api/ && mkdir -p mockgcp/devtools mv google/cloud/ mockgcp/ mv google/container/ mockgcp/ mv google/dataflow/ mockgcp/ +mv google/firestore/ mockgcp/ mv google/iam/ mockgcp/ mv google/logging/ mockgcp/ mv google/pubsub/ mockgcp/ @@ -53,6 +54,9 @@ find . -type f -print0 | xargs -0 sed -i -e "s@google\.container@mockgcp.contain find . -type f -print0 | xargs -0 sed -i -e "s@google/dataflow/@mockgcp/dataflow/@g" find . -type f -print0 | xargs -0 sed -i -e "s@google\.dataflow@mockgcp.dataflow@g" +find . -type f -print0 | xargs -0 sed -i -e "s@google/firestore/@mockgcp/firestore/@g" +find . -type f -print0 | xargs -0 sed -i -e "s@google\.firestore@mockgcp.firestore@g" + find . -type f -print0 | xargs -0 sed -i -e "s@google/iam/@mockgcp/iam/@g" find . -type f -print0 | xargs -0 sed -i -e "s@google\.iam@mockgcp.iam@g" diff --git a/mockgcp/generated/mockgcp/firestore/admin/v1/backup.pb.go b/mockgcp/generated/mockgcp/firestore/admin/v1/backup.pb.go new file mode 100644 index 0000000000..6e1d82be42 --- /dev/null +++ b/mockgcp/generated/mockgcp/firestore/admin/v1/backup.pb.go @@ -0,0 +1,437 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v3.12.4 +// source: mockgcp/firestore/admin/v1/backup.proto + +package adminpb + +import ( + timestamp "github.com/golang/protobuf/ptypes/timestamp" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Indicate the current state of the backup. +type Backup_State int32 + +const ( + // The state is unspecified. + Backup_STATE_UNSPECIFIED Backup_State = 0 + // The pending backup is still being created. Operations on the + // backup will be rejected in this state. + Backup_CREATING Backup_State = 1 + // The backup is complete and ready to use. + Backup_READY Backup_State = 2 + // The backup is not available at this moment. + Backup_NOT_AVAILABLE Backup_State = 3 +) + +// Enum value maps for Backup_State. +var ( + Backup_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "CREATING", + 2: "READY", + 3: "NOT_AVAILABLE", + } + Backup_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "NOT_AVAILABLE": 3, + } +) + +func (x Backup_State) Enum() *Backup_State { + p := new(Backup_State) + *p = x + return p +} + +func (x Backup_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Backup_State) Descriptor() protoreflect.EnumDescriptor { + return file_mockgcp_firestore_admin_v1_backup_proto_enumTypes[0].Descriptor() +} + +func (Backup_State) Type() protoreflect.EnumType { + return &file_mockgcp_firestore_admin_v1_backup_proto_enumTypes[0] +} + +func (x Backup_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Backup_State.Descriptor instead. +func (Backup_State) EnumDescriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_backup_proto_rawDescGZIP(), []int{0, 0} +} + +// A Backup of a Cloud Firestore Database. +// +// The backup contains all documents and index configurations for the given +// database at a specific point in time. +type Backup struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The unique resource name of the Backup. + // + // Format is `projects/{project}/locations/{location}/backups/{backup}`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Output only. Name of the Firestore database that the backup is from. + // + // Format is `projects/{project}/databases/{database}`. + Database string `protobuf:"bytes,2,opt,name=database,proto3" json:"database,omitempty"` + // Output only. The system-generated UUID4 for the Firestore database that the + // backup is from. + DatabaseUid string `protobuf:"bytes,7,opt,name=database_uid,json=databaseUid,proto3" json:"database_uid,omitempty"` + // Output only. The backup contains an externally consistent copy of the + // database at this time. + SnapshotTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=snapshot_time,json=snapshotTime,proto3" json:"snapshot_time,omitempty"` + // Output only. The timestamp at which this backup expires. + ExpireTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=expire_time,json=expireTime,proto3" json:"expire_time,omitempty"` + // Output only. Statistics about the backup. + // + // This data only becomes available after the backup is fully materialized to + // secondary storage. This field will be empty till then. + Stats *Backup_Stats `protobuf:"bytes,6,opt,name=stats,proto3" json:"stats,omitempty"` + // Output only. The current state of the backup. + State Backup_State `protobuf:"varint,8,opt,name=state,proto3,enum=mockgcp.firestore.admin.v1.Backup_State" json:"state,omitempty"` +} + +func (x *Backup) Reset() { + *x = Backup{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_backup_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Backup) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Backup) ProtoMessage() {} + +func (x *Backup) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_backup_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Backup.ProtoReflect.Descriptor instead. +func (*Backup) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_backup_proto_rawDescGZIP(), []int{0} +} + +func (x *Backup) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Backup) GetDatabase() string { + if x != nil { + return x.Database + } + return "" +} + +func (x *Backup) GetDatabaseUid() string { + if x != nil { + return x.DatabaseUid + } + return "" +} + +func (x *Backup) GetSnapshotTime() *timestamp.Timestamp { + if x != nil { + return x.SnapshotTime + } + return nil +} + +func (x *Backup) GetExpireTime() *timestamp.Timestamp { + if x != nil { + return x.ExpireTime + } + return nil +} + +func (x *Backup) GetStats() *Backup_Stats { + if x != nil { + return x.Stats + } + return nil +} + +func (x *Backup) GetState() Backup_State { + if x != nil { + return x.State + } + return Backup_STATE_UNSPECIFIED +} + +// Backup specific statistics. +type Backup_Stats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Summation of the size of all documents and index entries in + // the backup, measured in bytes. + SizeBytes int64 `protobuf:"varint,1,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"` + // Output only. The total number of documents contained in the backup. + DocumentCount int64 `protobuf:"varint,2,opt,name=document_count,json=documentCount,proto3" json:"document_count,omitempty"` + // Output only. The total number of index entries contained in the backup. + IndexCount int64 `protobuf:"varint,3,opt,name=index_count,json=indexCount,proto3" json:"index_count,omitempty"` +} + +func (x *Backup_Stats) Reset() { + *x = Backup_Stats{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_backup_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Backup_Stats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Backup_Stats) ProtoMessage() {} + +func (x *Backup_Stats) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_backup_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Backup_Stats.ProtoReflect.Descriptor instead. +func (*Backup_Stats) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_backup_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *Backup_Stats) GetSizeBytes() int64 { + if x != nil { + return x.SizeBytes + } + return 0 +} + +func (x *Backup_Stats) GetDocumentCount() int64 { + if x != nil { + return x.DocumentCount + } + return 0 +} + +func (x *Backup_Stats) GetIndexCount() int64 { + if x != nil { + return x.IndexCount + } + return 0 +} + +var File_mockgcp_firestore_admin_v1_backup_proto protoreflect.FileDescriptor + +var file_mockgcp_firestore_admin_v1_backup_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x63, + 0x6b, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x6d, 0x6f, 0x63, 0x6b, 0x67, + 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0xcd, 0x05, 0x0a, 0x06, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x17, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x45, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, + 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x03, 0xfa, 0x41, 0x23, + 0x0a, 0x21, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, 0x61, 0x62, + 0x61, 0x73, 0x65, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x26, 0x0a, + 0x0c, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, + 0x73, 0x65, 0x55, 0x69, 0x64, 0x12, 0x44, 0x0a, 0x0d, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0c, 0x73, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x65, + 0x78, 0x70, 0x69, 0x72, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, + 0x03, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x43, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6d, + 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x73, 0x12, 0x43, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x28, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, + 0x61, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x1a, 0x7d, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x12, 0x22, 0x0a, 0x0a, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, 0x73, 0x69, 0x7a, 0x65, 0x42, + 0x79, 0x74, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x0e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, + 0x03, 0x52, 0x0d, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x24, 0x0a, 0x0b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x4a, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, + 0x4e, 0x47, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x41, 0x44, 0x59, 0x10, 0x02, 0x12, + 0x11, 0x0a, 0x0d, 0x4e, 0x4f, 0x54, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, + 0x10, 0x03, 0x3a, 0x5e, 0xea, 0x41, 0x5b, 0x0a, 0x1f, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x38, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x7d, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x2f, 0x7b, 0x62, 0x61, 0x63, 0x6b, 0x75, + 0x70, 0x7d, 0x42, 0xdb, 0x01, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, + 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x70, 0x62, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x70, 0x62, 0xa2, + 0x02, 0x04, 0x47, 0x43, 0x46, 0x53, 0xaa, 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x46, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, + 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x46, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, + 0x65, 0x5c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x5c, 0x56, 0x31, 0xea, 0x02, 0x23, 0x47, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x46, 0x69, 0x72, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x3a, 0x3a, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_mockgcp_firestore_admin_v1_backup_proto_rawDescOnce sync.Once + file_mockgcp_firestore_admin_v1_backup_proto_rawDescData = file_mockgcp_firestore_admin_v1_backup_proto_rawDesc +) + +func file_mockgcp_firestore_admin_v1_backup_proto_rawDescGZIP() []byte { + file_mockgcp_firestore_admin_v1_backup_proto_rawDescOnce.Do(func() { + file_mockgcp_firestore_admin_v1_backup_proto_rawDescData = protoimpl.X.CompressGZIP(file_mockgcp_firestore_admin_v1_backup_proto_rawDescData) + }) + return file_mockgcp_firestore_admin_v1_backup_proto_rawDescData +} + +var file_mockgcp_firestore_admin_v1_backup_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_mockgcp_firestore_admin_v1_backup_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_mockgcp_firestore_admin_v1_backup_proto_goTypes = []interface{}{ + (Backup_State)(0), // 0: mockgcp.firestore.admin.v1.Backup.State + (*Backup)(nil), // 1: mockgcp.firestore.admin.v1.Backup + (*Backup_Stats)(nil), // 2: mockgcp.firestore.admin.v1.Backup.Stats + (*timestamp.Timestamp)(nil), // 3: google.protobuf.Timestamp +} +var file_mockgcp_firestore_admin_v1_backup_proto_depIdxs = []int32{ + 3, // 0: mockgcp.firestore.admin.v1.Backup.snapshot_time:type_name -> google.protobuf.Timestamp + 3, // 1: mockgcp.firestore.admin.v1.Backup.expire_time:type_name -> google.protobuf.Timestamp + 2, // 2: mockgcp.firestore.admin.v1.Backup.stats:type_name -> mockgcp.firestore.admin.v1.Backup.Stats + 0, // 3: mockgcp.firestore.admin.v1.Backup.state:type_name -> mockgcp.firestore.admin.v1.Backup.State + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_mockgcp_firestore_admin_v1_backup_proto_init() } +func file_mockgcp_firestore_admin_v1_backup_proto_init() { + if File_mockgcp_firestore_admin_v1_backup_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_mockgcp_firestore_admin_v1_backup_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Backup); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_backup_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Backup_Stats); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_mockgcp_firestore_admin_v1_backup_proto_rawDesc, + NumEnums: 1, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_mockgcp_firestore_admin_v1_backup_proto_goTypes, + DependencyIndexes: file_mockgcp_firestore_admin_v1_backup_proto_depIdxs, + EnumInfos: file_mockgcp_firestore_admin_v1_backup_proto_enumTypes, + MessageInfos: file_mockgcp_firestore_admin_v1_backup_proto_msgTypes, + }.Build() + File_mockgcp_firestore_admin_v1_backup_proto = out.File + file_mockgcp_firestore_admin_v1_backup_proto_rawDesc = nil + file_mockgcp_firestore_admin_v1_backup_proto_goTypes = nil + file_mockgcp_firestore_admin_v1_backup_proto_depIdxs = nil +} diff --git a/mockgcp/generated/mockgcp/firestore/admin/v1/database.pb.go b/mockgcp/generated/mockgcp/firestore/admin/v1/database.pb.go new file mode 100644 index 0000000000..21123e915e --- /dev/null +++ b/mockgcp/generated/mockgcp/firestore/admin/v1/database.pb.go @@ -0,0 +1,750 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v3.12.4 +// source: mockgcp/firestore/admin/v1/database.proto + +package adminpb + +import ( + duration "github.com/golang/protobuf/ptypes/duration" + timestamp "github.com/golang/protobuf/ptypes/timestamp" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The type of the database. +// See https://cloud.google.com/datastore/docs/firestore-or-datastore for +// information about how to choose. +// +// Mode changes are only allowed if the database is empty. +type Database_DatabaseType int32 + +const ( + // The default value. This value is used if the database type is omitted. + Database_DATABASE_TYPE_UNSPECIFIED Database_DatabaseType = 0 + // Firestore Native Mode + Database_FIRESTORE_NATIVE Database_DatabaseType = 1 + // Firestore in Datastore Mode. + Database_DATASTORE_MODE Database_DatabaseType = 2 +) + +// Enum value maps for Database_DatabaseType. +var ( + Database_DatabaseType_name = map[int32]string{ + 0: "DATABASE_TYPE_UNSPECIFIED", + 1: "FIRESTORE_NATIVE", + 2: "DATASTORE_MODE", + } + Database_DatabaseType_value = map[string]int32{ + "DATABASE_TYPE_UNSPECIFIED": 0, + "FIRESTORE_NATIVE": 1, + "DATASTORE_MODE": 2, + } +) + +func (x Database_DatabaseType) Enum() *Database_DatabaseType { + p := new(Database_DatabaseType) + *p = x + return p +} + +func (x Database_DatabaseType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Database_DatabaseType) Descriptor() protoreflect.EnumDescriptor { + return file_mockgcp_firestore_admin_v1_database_proto_enumTypes[0].Descriptor() +} + +func (Database_DatabaseType) Type() protoreflect.EnumType { + return &file_mockgcp_firestore_admin_v1_database_proto_enumTypes[0] +} + +func (x Database_DatabaseType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Database_DatabaseType.Descriptor instead. +func (Database_DatabaseType) EnumDescriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_database_proto_rawDescGZIP(), []int{0, 0} +} + +// The type of concurrency control mode for transactions. +type Database_ConcurrencyMode int32 + +const ( + // Not used. + Database_CONCURRENCY_MODE_UNSPECIFIED Database_ConcurrencyMode = 0 + // Use optimistic concurrency control by default. This mode is available + // for Cloud Firestore databases. + Database_OPTIMISTIC Database_ConcurrencyMode = 1 + // Use pessimistic concurrency control by default. This mode is available + // for Cloud Firestore databases. + // + // This is the default setting for Cloud Firestore. + Database_PESSIMISTIC Database_ConcurrencyMode = 2 + // Use optimistic concurrency control with entity groups by default. + // + // This is the only available mode for Cloud Datastore. + // + // This mode is also available for Cloud Firestore with Datastore Mode but + // is not recommended. + Database_OPTIMISTIC_WITH_ENTITY_GROUPS Database_ConcurrencyMode = 3 +) + +// Enum value maps for Database_ConcurrencyMode. +var ( + Database_ConcurrencyMode_name = map[int32]string{ + 0: "CONCURRENCY_MODE_UNSPECIFIED", + 1: "OPTIMISTIC", + 2: "PESSIMISTIC", + 3: "OPTIMISTIC_WITH_ENTITY_GROUPS", + } + Database_ConcurrencyMode_value = map[string]int32{ + "CONCURRENCY_MODE_UNSPECIFIED": 0, + "OPTIMISTIC": 1, + "PESSIMISTIC": 2, + "OPTIMISTIC_WITH_ENTITY_GROUPS": 3, + } +) + +func (x Database_ConcurrencyMode) Enum() *Database_ConcurrencyMode { + p := new(Database_ConcurrencyMode) + *p = x + return p +} + +func (x Database_ConcurrencyMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Database_ConcurrencyMode) Descriptor() protoreflect.EnumDescriptor { + return file_mockgcp_firestore_admin_v1_database_proto_enumTypes[1].Descriptor() +} + +func (Database_ConcurrencyMode) Type() protoreflect.EnumType { + return &file_mockgcp_firestore_admin_v1_database_proto_enumTypes[1] +} + +func (x Database_ConcurrencyMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Database_ConcurrencyMode.Descriptor instead. +func (Database_ConcurrencyMode) EnumDescriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_database_proto_rawDescGZIP(), []int{0, 1} +} + +// Point In Time Recovery feature enablement. +type Database_PointInTimeRecoveryEnablement int32 + +const ( + // Not used. + Database_POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED Database_PointInTimeRecoveryEnablement = 0 + // Reads are supported on selected versions of the data from within the past + // 7 days: + // + // * Reads against any timestamp within the past hour + // * Reads against 1-minute snapshots beyond 1 hour and within 7 days + // + // `version_retention_period` and `earliest_version_time` can be + // used to determine the supported versions. + Database_POINT_IN_TIME_RECOVERY_ENABLED Database_PointInTimeRecoveryEnablement = 1 + // Reads are supported on any version of the data from within the past 1 + // hour. + Database_POINT_IN_TIME_RECOVERY_DISABLED Database_PointInTimeRecoveryEnablement = 2 +) + +// Enum value maps for Database_PointInTimeRecoveryEnablement. +var ( + Database_PointInTimeRecoveryEnablement_name = map[int32]string{ + 0: "POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED", + 1: "POINT_IN_TIME_RECOVERY_ENABLED", + 2: "POINT_IN_TIME_RECOVERY_DISABLED", + } + Database_PointInTimeRecoveryEnablement_value = map[string]int32{ + "POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED": 0, + "POINT_IN_TIME_RECOVERY_ENABLED": 1, + "POINT_IN_TIME_RECOVERY_DISABLED": 2, + } +) + +func (x Database_PointInTimeRecoveryEnablement) Enum() *Database_PointInTimeRecoveryEnablement { + p := new(Database_PointInTimeRecoveryEnablement) + *p = x + return p +} + +func (x Database_PointInTimeRecoveryEnablement) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Database_PointInTimeRecoveryEnablement) Descriptor() protoreflect.EnumDescriptor { + return file_mockgcp_firestore_admin_v1_database_proto_enumTypes[2].Descriptor() +} + +func (Database_PointInTimeRecoveryEnablement) Type() protoreflect.EnumType { + return &file_mockgcp_firestore_admin_v1_database_proto_enumTypes[2] +} + +func (x Database_PointInTimeRecoveryEnablement) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Database_PointInTimeRecoveryEnablement.Descriptor instead. +func (Database_PointInTimeRecoveryEnablement) EnumDescriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_database_proto_rawDescGZIP(), []int{0, 2} +} + +// The type of App Engine integration mode. +type Database_AppEngineIntegrationMode int32 + +const ( + // Not used. + Database_APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED Database_AppEngineIntegrationMode = 0 + // If an App Engine application exists in the same region as this database, + // App Engine configuration will impact this database. This includes + // disabling of the application & database, as well as disabling writes to + // the database. + Database_ENABLED Database_AppEngineIntegrationMode = 1 + // App Engine has no effect on the ability of this database to serve + // requests. + // + // This is the default setting for databases created with the Firestore API. + Database_DISABLED Database_AppEngineIntegrationMode = 2 +) + +// Enum value maps for Database_AppEngineIntegrationMode. +var ( + Database_AppEngineIntegrationMode_name = map[int32]string{ + 0: "APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED", + 1: "ENABLED", + 2: "DISABLED", + } + Database_AppEngineIntegrationMode_value = map[string]int32{ + "APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED": 0, + "ENABLED": 1, + "DISABLED": 2, + } +) + +func (x Database_AppEngineIntegrationMode) Enum() *Database_AppEngineIntegrationMode { + p := new(Database_AppEngineIntegrationMode) + *p = x + return p +} + +func (x Database_AppEngineIntegrationMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Database_AppEngineIntegrationMode) Descriptor() protoreflect.EnumDescriptor { + return file_mockgcp_firestore_admin_v1_database_proto_enumTypes[3].Descriptor() +} + +func (Database_AppEngineIntegrationMode) Type() protoreflect.EnumType { + return &file_mockgcp_firestore_admin_v1_database_proto_enumTypes[3] +} + +func (x Database_AppEngineIntegrationMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Database_AppEngineIntegrationMode.Descriptor instead. +func (Database_AppEngineIntegrationMode) EnumDescriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_database_proto_rawDescGZIP(), []int{0, 3} +} + +// The delete protection state of the database. +type Database_DeleteProtectionState int32 + +const ( + // The default value. Delete protection type is not specified + Database_DELETE_PROTECTION_STATE_UNSPECIFIED Database_DeleteProtectionState = 0 + // Delete protection is disabled + Database_DELETE_PROTECTION_DISABLED Database_DeleteProtectionState = 1 + // Delete protection is enabled + Database_DELETE_PROTECTION_ENABLED Database_DeleteProtectionState = 2 +) + +// Enum value maps for Database_DeleteProtectionState. +var ( + Database_DeleteProtectionState_name = map[int32]string{ + 0: "DELETE_PROTECTION_STATE_UNSPECIFIED", + 1: "DELETE_PROTECTION_DISABLED", + 2: "DELETE_PROTECTION_ENABLED", + } + Database_DeleteProtectionState_value = map[string]int32{ + "DELETE_PROTECTION_STATE_UNSPECIFIED": 0, + "DELETE_PROTECTION_DISABLED": 1, + "DELETE_PROTECTION_ENABLED": 2, + } +) + +func (x Database_DeleteProtectionState) Enum() *Database_DeleteProtectionState { + p := new(Database_DeleteProtectionState) + *p = x + return p +} + +func (x Database_DeleteProtectionState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Database_DeleteProtectionState) Descriptor() protoreflect.EnumDescriptor { + return file_mockgcp_firestore_admin_v1_database_proto_enumTypes[4].Descriptor() +} + +func (Database_DeleteProtectionState) Type() protoreflect.EnumType { + return &file_mockgcp_firestore_admin_v1_database_proto_enumTypes[4] +} + +func (x Database_DeleteProtectionState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Database_DeleteProtectionState.Descriptor instead. +func (Database_DeleteProtectionState) EnumDescriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_database_proto_rawDescGZIP(), []int{0, 4} +} + +// A Cloud Firestore Database. +type Database struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The resource name of the Database. + // Format: `projects/{project}/databases/{database}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Output only. The system-generated UUID4 for this Database. + Uid string `protobuf:"bytes,3,opt,name=uid,proto3" json:"uid,omitempty"` + // Output only. The timestamp at which this database was created. Databases + // created before 2016 do not populate create_time. + CreateTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. The timestamp at which this database was most recently + // updated. Note this only includes updates to the database resource and not + // data contained by the database. + UpdateTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + // The location of the database. Available locations are listed at + // https://cloud.google.com/firestore/docs/locations. + LocationId string `protobuf:"bytes,9,opt,name=location_id,json=locationId,proto3" json:"location_id,omitempty"` + // The type of the database. + // See https://cloud.google.com/datastore/docs/firestore-or-datastore for + // information about how to choose. + Type Database_DatabaseType `protobuf:"varint,10,opt,name=type,proto3,enum=mockgcp.firestore.admin.v1.Database_DatabaseType" json:"type,omitempty"` + // The concurrency control mode to use for this database. + ConcurrencyMode Database_ConcurrencyMode `protobuf:"varint,15,opt,name=concurrency_mode,json=concurrencyMode,proto3,enum=mockgcp.firestore.admin.v1.Database_ConcurrencyMode" json:"concurrency_mode,omitempty"` + // Output only. The period during which past versions of data are retained in + // the database. + // + // Any [read][mockgcp.firestore.v1.GetDocumentRequest.read_time] + // or [query][mockgcp.firestore.v1.ListDocumentsRequest.read_time] can specify + // a `read_time` within this window, and will read the state of the database + // at that time. + // + // If the PITR feature is enabled, the retention period is 7 days. Otherwise, + // the retention period is 1 hour. + VersionRetentionPeriod *duration.Duration `protobuf:"bytes,17,opt,name=version_retention_period,json=versionRetentionPeriod,proto3" json:"version_retention_period,omitempty"` + // Output only. The earliest timestamp at which older versions of the data can + // be read from the database. See [version_retention_period] above; this field + // is populated with `now - version_retention_period`. + // + // This value is continuously updated, and becomes stale the moment it is + // queried. If you are using this value to recover data, make sure to account + // for the time from the moment when the value is queried to the moment when + // you initiate the recovery. + EarliestVersionTime *timestamp.Timestamp `protobuf:"bytes,18,opt,name=earliest_version_time,json=earliestVersionTime,proto3" json:"earliest_version_time,omitempty"` + // Whether to enable the PITR feature on this database. + PointInTimeRecoveryEnablement Database_PointInTimeRecoveryEnablement `protobuf:"varint,21,opt,name=point_in_time_recovery_enablement,json=pointInTimeRecoveryEnablement,proto3,enum=mockgcp.firestore.admin.v1.Database_PointInTimeRecoveryEnablement" json:"point_in_time_recovery_enablement,omitempty"` + // The App Engine integration mode to use for this database. + AppEngineIntegrationMode Database_AppEngineIntegrationMode `protobuf:"varint,19,opt,name=app_engine_integration_mode,json=appEngineIntegrationMode,proto3,enum=mockgcp.firestore.admin.v1.Database_AppEngineIntegrationMode" json:"app_engine_integration_mode,omitempty"` + // Output only. The key_prefix for this database. This key_prefix is used, in + // combination with the project id ("~") to construct + // the application id that is returned from the Cloud Datastore APIs in Google + // App Engine first generation runtimes. + // + // This value may be empty in which case the appid to use for URL-encoded keys + // is the project_id (eg: foo instead of v~foo). + KeyPrefix string `protobuf:"bytes,20,opt,name=key_prefix,json=keyPrefix,proto3" json:"key_prefix,omitempty"` + // State of delete protection for the database. + DeleteProtectionState Database_DeleteProtectionState `protobuf:"varint,22,opt,name=delete_protection_state,json=deleteProtectionState,proto3,enum=mockgcp.firestore.admin.v1.Database_DeleteProtectionState" json:"delete_protection_state,omitempty"` + // This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + Etag string `protobuf:"bytes,99,opt,name=etag,proto3" json:"etag,omitempty"` +} + +func (x *Database) Reset() { + *x = Database{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_database_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Database) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Database) ProtoMessage() {} + +func (x *Database) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_database_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Database.ProtoReflect.Descriptor instead. +func (*Database) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_database_proto_rawDescGZIP(), []int{0} +} + +func (x *Database) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Database) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *Database) GetCreateTime() *timestamp.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *Database) GetUpdateTime() *timestamp.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +func (x *Database) GetLocationId() string { + if x != nil { + return x.LocationId + } + return "" +} + +func (x *Database) GetType() Database_DatabaseType { + if x != nil { + return x.Type + } + return Database_DATABASE_TYPE_UNSPECIFIED +} + +func (x *Database) GetConcurrencyMode() Database_ConcurrencyMode { + if x != nil { + return x.ConcurrencyMode + } + return Database_CONCURRENCY_MODE_UNSPECIFIED +} + +func (x *Database) GetVersionRetentionPeriod() *duration.Duration { + if x != nil { + return x.VersionRetentionPeriod + } + return nil +} + +func (x *Database) GetEarliestVersionTime() *timestamp.Timestamp { + if x != nil { + return x.EarliestVersionTime + } + return nil +} + +func (x *Database) GetPointInTimeRecoveryEnablement() Database_PointInTimeRecoveryEnablement { + if x != nil { + return x.PointInTimeRecoveryEnablement + } + return Database_POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED +} + +func (x *Database) GetAppEngineIntegrationMode() Database_AppEngineIntegrationMode { + if x != nil { + return x.AppEngineIntegrationMode + } + return Database_APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED +} + +func (x *Database) GetKeyPrefix() string { + if x != nil { + return x.KeyPrefix + } + return "" +} + +func (x *Database) GetDeleteProtectionState() Database_DeleteProtectionState { + if x != nil { + return x.DeleteProtectionState + } + return Database_DELETE_PROTECTION_STATE_UNSPECIFIED +} + +func (x *Database) GetEtag() string { + if x != nil { + return x.Etag + } + return "" +} + +var File_mockgcp_firestore_admin_v1_database_proto protoreflect.FileDescriptor + +var file_mockgcp_firestore_admin_v1_database_proto_rawDesc = []byte{ + 0x0a, 0x29, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x74, + 0x61, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x6d, 0x6f, 0x63, + 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, + 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x93, 0x0d, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x15, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x40, 0x0a, 0x0b, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, + 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, + 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, + 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x12, 0x45, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x31, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, + 0x61, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x5f, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x0f, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, + 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x63, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x63, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x58, 0x0a, 0x18, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, + 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x16, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, + 0x69, 0x6f, 0x64, 0x12, 0x53, 0x0a, 0x15, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x73, 0x74, 0x5f, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x12, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x52, 0x13, 0x65, 0x61, 0x72, 0x6c, 0x69, 0x65, 0x73, 0x74, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x8c, 0x01, 0x0a, 0x21, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x5f, 0x69, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x76, + 0x65, 0x72, 0x79, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x15, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x42, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, + 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, + 0x49, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x45, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x1d, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x49, + 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x7c, 0x0a, 0x1b, 0x61, 0x70, 0x70, 0x5f, 0x65, + 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3d, 0x2e, 0x6d, + 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x49, 0x6e, 0x74, 0x65, + 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x18, 0x61, 0x70, 0x70, + 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x09, + 0x6b, 0x65, 0x79, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x72, 0x0a, 0x17, 0x64, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3a, 0x2e, 0x6d, 0x6f, 0x63, + 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x15, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x65, 0x74, 0x61, 0x67, 0x18, 0x63, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x65, 0x74, 0x61, + 0x67, 0x22, 0x57, 0x0a, 0x0c, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x14, 0x0a, 0x10, 0x46, 0x49, 0x52, 0x45, 0x53, 0x54, 0x4f, 0x52, 0x45, 0x5f, 0x4e, 0x41, + 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x41, 0x54, 0x41, 0x53, 0x54, + 0x4f, 0x52, 0x45, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x10, 0x02, 0x22, 0x77, 0x0a, 0x0f, 0x43, 0x6f, + 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x20, 0x0a, + 0x1c, 0x43, 0x4f, 0x4e, 0x43, 0x55, 0x52, 0x52, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x4d, 0x4f, 0x44, + 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x54, 0x49, 0x4d, 0x49, 0x53, 0x54, 0x49, 0x43, 0x10, 0x01, 0x12, + 0x0f, 0x0a, 0x0b, 0x50, 0x45, 0x53, 0x53, 0x49, 0x4d, 0x49, 0x53, 0x54, 0x49, 0x43, 0x10, 0x02, + 0x12, 0x21, 0x0a, 0x1d, 0x4f, 0x50, 0x54, 0x49, 0x4d, 0x49, 0x53, 0x54, 0x49, 0x43, 0x5f, 0x57, + 0x49, 0x54, 0x48, 0x5f, 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, + 0x53, 0x10, 0x03, 0x22, 0x9b, 0x01, 0x0a, 0x1d, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x49, 0x6e, 0x54, + 0x69, 0x6d, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x31, 0x0a, 0x2d, 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x49, + 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x52, 0x45, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x59, 0x5f, + 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x50, 0x4f, 0x49, 0x4e, + 0x54, 0x5f, 0x49, 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x52, 0x45, 0x43, 0x4f, 0x56, 0x45, + 0x52, 0x59, 0x5f, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x23, 0x0a, 0x1f, + 0x50, 0x4f, 0x49, 0x4e, 0x54, 0x5f, 0x49, 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x52, 0x45, + 0x43, 0x4f, 0x56, 0x45, 0x52, 0x59, 0x5f, 0x44, 0x49, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, + 0x02, 0x22, 0x62, 0x0a, 0x18, 0x41, 0x70, 0x70, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x49, 0x6e, + 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x2b, 0x0a, + 0x27, 0x41, 0x50, 0x50, 0x5f, 0x45, 0x4e, 0x47, 0x49, 0x4e, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x45, + 0x47, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x4e, + 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x49, 0x53, 0x41, 0x42, + 0x4c, 0x45, 0x44, 0x10, 0x02, 0x22, 0x7f, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x27, + 0x0a, 0x23, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x45, 0x43, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x44, 0x45, 0x4c, 0x45, 0x54, + 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x49, 0x53, + 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x44, 0x45, 0x4c, 0x45, 0x54, + 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x45, 0x4e, 0x41, + 0x42, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x3a, 0x52, 0xea, 0x41, 0x4f, 0x0a, 0x21, 0x66, 0x69, 0x72, + 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x27, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x7b, 0x64, 0x61, + 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x7d, 0x52, 0x01, 0x01, 0x42, 0xdd, 0x01, 0x0a, 0x1e, 0x63, + 0x6f, 0x6d, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x44, + 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x67, 0x6f, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x76, 0x31, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x70, + 0x62, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x70, 0x62, 0xa2, 0x02, 0x04, 0x47, 0x43, 0x46, 0x53, + 0xaa, 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x46, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x56, 0x31, 0xca, 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, + 0x64, 0x5c, 0x46, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5c, 0x41, 0x64, 0x6d, 0x69, + 0x6e, 0x5c, 0x56, 0x31, 0xea, 0x02, 0x23, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, + 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x46, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x3a, + 0x3a, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_mockgcp_firestore_admin_v1_database_proto_rawDescOnce sync.Once + file_mockgcp_firestore_admin_v1_database_proto_rawDescData = file_mockgcp_firestore_admin_v1_database_proto_rawDesc +) + +func file_mockgcp_firestore_admin_v1_database_proto_rawDescGZIP() []byte { + file_mockgcp_firestore_admin_v1_database_proto_rawDescOnce.Do(func() { + file_mockgcp_firestore_admin_v1_database_proto_rawDescData = protoimpl.X.CompressGZIP(file_mockgcp_firestore_admin_v1_database_proto_rawDescData) + }) + return file_mockgcp_firestore_admin_v1_database_proto_rawDescData +} + +var file_mockgcp_firestore_admin_v1_database_proto_enumTypes = make([]protoimpl.EnumInfo, 5) +var file_mockgcp_firestore_admin_v1_database_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_mockgcp_firestore_admin_v1_database_proto_goTypes = []interface{}{ + (Database_DatabaseType)(0), // 0: mockgcp.firestore.admin.v1.Database.DatabaseType + (Database_ConcurrencyMode)(0), // 1: mockgcp.firestore.admin.v1.Database.ConcurrencyMode + (Database_PointInTimeRecoveryEnablement)(0), // 2: mockgcp.firestore.admin.v1.Database.PointInTimeRecoveryEnablement + (Database_AppEngineIntegrationMode)(0), // 3: mockgcp.firestore.admin.v1.Database.AppEngineIntegrationMode + (Database_DeleteProtectionState)(0), // 4: mockgcp.firestore.admin.v1.Database.DeleteProtectionState + (*Database)(nil), // 5: mockgcp.firestore.admin.v1.Database + (*timestamp.Timestamp)(nil), // 6: google.protobuf.Timestamp + (*duration.Duration)(nil), // 7: google.protobuf.Duration +} +var file_mockgcp_firestore_admin_v1_database_proto_depIdxs = []int32{ + 6, // 0: mockgcp.firestore.admin.v1.Database.create_time:type_name -> google.protobuf.Timestamp + 6, // 1: mockgcp.firestore.admin.v1.Database.update_time:type_name -> google.protobuf.Timestamp + 0, // 2: mockgcp.firestore.admin.v1.Database.type:type_name -> mockgcp.firestore.admin.v1.Database.DatabaseType + 1, // 3: mockgcp.firestore.admin.v1.Database.concurrency_mode:type_name -> mockgcp.firestore.admin.v1.Database.ConcurrencyMode + 7, // 4: mockgcp.firestore.admin.v1.Database.version_retention_period:type_name -> google.protobuf.Duration + 6, // 5: mockgcp.firestore.admin.v1.Database.earliest_version_time:type_name -> google.protobuf.Timestamp + 2, // 6: mockgcp.firestore.admin.v1.Database.point_in_time_recovery_enablement:type_name -> mockgcp.firestore.admin.v1.Database.PointInTimeRecoveryEnablement + 3, // 7: mockgcp.firestore.admin.v1.Database.app_engine_integration_mode:type_name -> mockgcp.firestore.admin.v1.Database.AppEngineIntegrationMode + 4, // 8: mockgcp.firestore.admin.v1.Database.delete_protection_state:type_name -> mockgcp.firestore.admin.v1.Database.DeleteProtectionState + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_mockgcp_firestore_admin_v1_database_proto_init() } +func file_mockgcp_firestore_admin_v1_database_proto_init() { + if File_mockgcp_firestore_admin_v1_database_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_mockgcp_firestore_admin_v1_database_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Database); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_mockgcp_firestore_admin_v1_database_proto_rawDesc, + NumEnums: 5, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_mockgcp_firestore_admin_v1_database_proto_goTypes, + DependencyIndexes: file_mockgcp_firestore_admin_v1_database_proto_depIdxs, + EnumInfos: file_mockgcp_firestore_admin_v1_database_proto_enumTypes, + MessageInfos: file_mockgcp_firestore_admin_v1_database_proto_msgTypes, + }.Build() + File_mockgcp_firestore_admin_v1_database_proto = out.File + file_mockgcp_firestore_admin_v1_database_proto_rawDesc = nil + file_mockgcp_firestore_admin_v1_database_proto_goTypes = nil + file_mockgcp_firestore_admin_v1_database_proto_depIdxs = nil +} diff --git a/mockgcp/generated/mockgcp/firestore/admin/v1/field.pb.go b/mockgcp/generated/mockgcp/firestore/admin/v1/field.pb.go new file mode 100644 index 0000000000..be6ec73bc8 --- /dev/null +++ b/mockgcp/generated/mockgcp/firestore/admin/v1/field.pb.go @@ -0,0 +1,510 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v3.12.4 +// source: mockgcp/firestore/admin/v1/field.proto + +package adminpb + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The state of applying the TTL configuration to all documents. +type Field_TtlConfig_State int32 + +const ( + // The state is unspecified or unknown. + Field_TtlConfig_STATE_UNSPECIFIED Field_TtlConfig_State = 0 + // The TTL is being applied. There is an active long-running operation to + // track the change. Newly written documents will have TTLs applied as + // requested. Requested TTLs on existing documents are still being + // processed. When TTLs on all existing documents have been processed, the + // state will move to 'ACTIVE'. + Field_TtlConfig_CREATING Field_TtlConfig_State = 1 + // The TTL is active for all documents. + Field_TtlConfig_ACTIVE Field_TtlConfig_State = 2 + // The TTL configuration could not be enabled for all existing documents. + // Newly written documents will continue to have their TTL applied. + // The LRO returned when last attempting to enable TTL for this `Field` + // has failed, and may have more details. + Field_TtlConfig_NEEDS_REPAIR Field_TtlConfig_State = 3 +) + +// Enum value maps for Field_TtlConfig_State. +var ( + Field_TtlConfig_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "CREATING", + 2: "ACTIVE", + 3: "NEEDS_REPAIR", + } + Field_TtlConfig_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "ACTIVE": 2, + "NEEDS_REPAIR": 3, + } +) + +func (x Field_TtlConfig_State) Enum() *Field_TtlConfig_State { + p := new(Field_TtlConfig_State) + *p = x + return p +} + +func (x Field_TtlConfig_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Field_TtlConfig_State) Descriptor() protoreflect.EnumDescriptor { + return file_mockgcp_firestore_admin_v1_field_proto_enumTypes[0].Descriptor() +} + +func (Field_TtlConfig_State) Type() protoreflect.EnumType { + return &file_mockgcp_firestore_admin_v1_field_proto_enumTypes[0] +} + +func (x Field_TtlConfig_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Field_TtlConfig_State.Descriptor instead. +func (Field_TtlConfig_State) EnumDescriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_field_proto_rawDescGZIP(), []int{0, 1, 0} +} + +// Represents a single field in the database. +// +// Fields are grouped by their "Collection Group", which represent all +// collections in the database with the same ID. +type Field struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. A field name of the form: + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + // + // A field path can be a simple field name, e.g. `address` or a path to fields + // within `map_value` , e.g. `address.city`, + // or a special field path. The only valid special field is `*`, which + // represents any field. + // + // Field paths can be quoted using “ ` “ (backtick). The only character that + // must be escaped within a quoted field path is the backtick character + // itself, escaped using a backslash. Special characters in field paths that + // must be quoted include: `*`, `.`, + // “ ` “ (backtick), `[`, `]`, as well as any ascii symbolic characters. + // + // Examples: + // “ `address.city` “ represents a field named `address.city`, not the map + // key `city` in the field `address`. “ `*` “ represents a field named `*`, + // not any field. + // + // A special `Field` contains the default indexing settings for all fields. + // This field's resource name is: + // `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` + // Indexes defined on this `Field` will be applied to all fields which do not + // have their own `Field` index configuration. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The index configuration for this field. If unset, field indexing will + // revert to the configuration defined by the `ancestor_field`. To + // explicitly remove all indexes for this field, specify an index config + // with an empty list of indexes. + IndexConfig *Field_IndexConfig `protobuf:"bytes,2,opt,name=index_config,json=indexConfig,proto3" json:"index_config,omitempty"` + // The TTL configuration for this `Field`. + // Setting or unsetting this will enable or disable the TTL for + // documents that have this `Field`. + TtlConfig *Field_TtlConfig `protobuf:"bytes,3,opt,name=ttl_config,json=ttlConfig,proto3" json:"ttl_config,omitempty"` +} + +func (x *Field) Reset() { + *x = Field{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_field_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Field) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Field) ProtoMessage() {} + +func (x *Field) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_field_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Field.ProtoReflect.Descriptor instead. +func (*Field) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_field_proto_rawDescGZIP(), []int{0} +} + +func (x *Field) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Field) GetIndexConfig() *Field_IndexConfig { + if x != nil { + return x.IndexConfig + } + return nil +} + +func (x *Field) GetTtlConfig() *Field_TtlConfig { + if x != nil { + return x.TtlConfig + } + return nil +} + +// The index configuration for this field. +type Field_IndexConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The indexes supported for this field. + Indexes []*Index `protobuf:"bytes,1,rep,name=indexes,proto3" json:"indexes,omitempty"` + // Output only. When true, the `Field`'s index configuration is set from the + // configuration specified by the `ancestor_field`. + // When false, the `Field`'s index configuration is defined explicitly. + UsesAncestorConfig bool `protobuf:"varint,2,opt,name=uses_ancestor_config,json=usesAncestorConfig,proto3" json:"uses_ancestor_config,omitempty"` + // Output only. Specifies the resource name of the `Field` from which this + // field's index configuration is set (when `uses_ancestor_config` is true), + // or from which it *would* be set if this field had no index configuration + // (when `uses_ancestor_config` is false). + AncestorField string `protobuf:"bytes,3,opt,name=ancestor_field,json=ancestorField,proto3" json:"ancestor_field,omitempty"` + // Output only + // When true, the `Field`'s index configuration is in the process of being + // reverted. Once complete, the index config will transition to the same + // state as the field specified by `ancestor_field`, at which point + // `uses_ancestor_config` will be `true` and `reverting` will be `false`. + Reverting bool `protobuf:"varint,4,opt,name=reverting,proto3" json:"reverting,omitempty"` +} + +func (x *Field_IndexConfig) Reset() { + *x = Field_IndexConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_field_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Field_IndexConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Field_IndexConfig) ProtoMessage() {} + +func (x *Field_IndexConfig) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_field_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Field_IndexConfig.ProtoReflect.Descriptor instead. +func (*Field_IndexConfig) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_field_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *Field_IndexConfig) GetIndexes() []*Index { + if x != nil { + return x.Indexes + } + return nil +} + +func (x *Field_IndexConfig) GetUsesAncestorConfig() bool { + if x != nil { + return x.UsesAncestorConfig + } + return false +} + +func (x *Field_IndexConfig) GetAncestorField() string { + if x != nil { + return x.AncestorField + } + return "" +} + +func (x *Field_IndexConfig) GetReverting() bool { + if x != nil { + return x.Reverting + } + return false +} + +// The TTL (time-to-live) configuration for documents that have this `Field` +// set. +// +// Storing a timestamp value into a TTL-enabled field will be treated as +// the document's absolute expiration time. Timestamp values in the past +// indicate that the document is eligible for immediate expiration. Using any +// other data type or leaving the field absent will disable expiration for the +// individual document. +type Field_TtlConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The state of the TTL configuration. + State Field_TtlConfig_State `protobuf:"varint,1,opt,name=state,proto3,enum=mockgcp.firestore.admin.v1.Field_TtlConfig_State" json:"state,omitempty"` +} + +func (x *Field_TtlConfig) Reset() { + *x = Field_TtlConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_field_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Field_TtlConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Field_TtlConfig) ProtoMessage() {} + +func (x *Field_TtlConfig) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_field_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Field_TtlConfig.ProtoReflect.Descriptor instead. +func (*Field_TtlConfig) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_field_proto_rawDescGZIP(), []int{0, 1} +} + +func (x *Field_TtlConfig) GetState() Field_TtlConfig_State { + if x != nil { + return x.State + } + return Field_TtlConfig_STATE_UNSPECIFIED +} + +var File_mockgcp_firestore_admin_v1_field_proto protoreflect.FileDescriptor + +var file_mockgcp_firestore_admin_v1_field_proto_rawDesc = []byte{ + 0x0a, 0x26, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, + 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x26, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa5, 0x05, 0x0a, 0x05, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x50, 0x0a, 0x0c, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2d, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x0b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4a, 0x0a, + 0x0a, 0x74, 0x74, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2b, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x54, 0x74, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x09, + 0x74, 0x74, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xc1, 0x01, 0x0a, 0x0b, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3b, 0x0a, 0x07, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x6f, 0x63, + 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x07, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x75, 0x73, 0x65, 0x73, 0x5f, 0x61, + 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x75, 0x73, 0x65, 0x73, 0x41, 0x6e, 0x63, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x6e, 0x63, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, + 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x09, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x1a, 0xa5, 0x01, + 0x0a, 0x09, 0x54, 0x74, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4c, 0x0a, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x6d, 0x6f, 0x63, + 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x54, 0x74, + 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x03, 0xe0, + 0x41, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x4a, 0x0a, 0x05, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, 0x45, + 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x54, 0x49, 0x56, + 0x45, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4e, 0x45, 0x45, 0x44, 0x53, 0x5f, 0x52, 0x45, 0x50, + 0x41, 0x49, 0x52, 0x10, 0x03, 0x3a, 0x79, 0xea, 0x41, 0x76, 0x0a, 0x1e, 0x66, 0x69, 0x72, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x54, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x64, + 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, + 0x73, 0x65, 0x7d, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x7b, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x7d, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x2f, 0x7b, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x7d, + 0x42, 0xda, 0x01, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, + 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x39, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x70, 0x62, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x70, 0x62, 0xa2, 0x02, 0x04, 0x47, + 0x43, 0x46, 0x53, 0xaa, 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x46, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, + 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x46, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5c, 0x41, + 0x64, 0x6d, 0x69, 0x6e, 0x5c, 0x56, 0x31, 0xea, 0x02, 0x23, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x46, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x3a, 0x3a, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_mockgcp_firestore_admin_v1_field_proto_rawDescOnce sync.Once + file_mockgcp_firestore_admin_v1_field_proto_rawDescData = file_mockgcp_firestore_admin_v1_field_proto_rawDesc +) + +func file_mockgcp_firestore_admin_v1_field_proto_rawDescGZIP() []byte { + file_mockgcp_firestore_admin_v1_field_proto_rawDescOnce.Do(func() { + file_mockgcp_firestore_admin_v1_field_proto_rawDescData = protoimpl.X.CompressGZIP(file_mockgcp_firestore_admin_v1_field_proto_rawDescData) + }) + return file_mockgcp_firestore_admin_v1_field_proto_rawDescData +} + +var file_mockgcp_firestore_admin_v1_field_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_mockgcp_firestore_admin_v1_field_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_mockgcp_firestore_admin_v1_field_proto_goTypes = []interface{}{ + (Field_TtlConfig_State)(0), // 0: mockgcp.firestore.admin.v1.Field.TtlConfig.State + (*Field)(nil), // 1: mockgcp.firestore.admin.v1.Field + (*Field_IndexConfig)(nil), // 2: mockgcp.firestore.admin.v1.Field.IndexConfig + (*Field_TtlConfig)(nil), // 3: mockgcp.firestore.admin.v1.Field.TtlConfig + (*Index)(nil), // 4: mockgcp.firestore.admin.v1.Index +} +var file_mockgcp_firestore_admin_v1_field_proto_depIdxs = []int32{ + 2, // 0: mockgcp.firestore.admin.v1.Field.index_config:type_name -> mockgcp.firestore.admin.v1.Field.IndexConfig + 3, // 1: mockgcp.firestore.admin.v1.Field.ttl_config:type_name -> mockgcp.firestore.admin.v1.Field.TtlConfig + 4, // 2: mockgcp.firestore.admin.v1.Field.IndexConfig.indexes:type_name -> mockgcp.firestore.admin.v1.Index + 0, // 3: mockgcp.firestore.admin.v1.Field.TtlConfig.state:type_name -> mockgcp.firestore.admin.v1.Field.TtlConfig.State + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_mockgcp_firestore_admin_v1_field_proto_init() } +func file_mockgcp_firestore_admin_v1_field_proto_init() { + if File_mockgcp_firestore_admin_v1_field_proto != nil { + return + } + file_mockgcp_firestore_admin_v1_index_proto_init() + if !protoimpl.UnsafeEnabled { + file_mockgcp_firestore_admin_v1_field_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Field); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_field_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Field_IndexConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_field_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Field_TtlConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_mockgcp_firestore_admin_v1_field_proto_rawDesc, + NumEnums: 1, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_mockgcp_firestore_admin_v1_field_proto_goTypes, + DependencyIndexes: file_mockgcp_firestore_admin_v1_field_proto_depIdxs, + EnumInfos: file_mockgcp_firestore_admin_v1_field_proto_enumTypes, + MessageInfos: file_mockgcp_firestore_admin_v1_field_proto_msgTypes, + }.Build() + File_mockgcp_firestore_admin_v1_field_proto = out.File + file_mockgcp_firestore_admin_v1_field_proto_rawDesc = nil + file_mockgcp_firestore_admin_v1_field_proto_goTypes = nil + file_mockgcp_firestore_admin_v1_field_proto_depIdxs = nil +} diff --git a/mockgcp/generated/mockgcp/firestore/admin/v1/firestore_admin.pb.go b/mockgcp/generated/mockgcp/firestore/admin/v1/firestore_admin.pb.go new file mode 100644 index 0000000000..a449d04e5e --- /dev/null +++ b/mockgcp/generated/mockgcp/firestore/admin/v1/firestore_admin.pb.go @@ -0,0 +1,3226 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v3.12.4 +// source: mockgcp/firestore/admin/v1/firestore_admin.proto + +package adminpb + +import ( + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + empty "github.com/golang/protobuf/ptypes/empty" + timestamp "github.com/golang/protobuf/ptypes/timestamp" + _ "google.golang.org/genproto/googleapis/api/annotations" + field_mask "google.golang.org/genproto/protobuf/field_mask" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A request to list the Firestore Databases in all locations for a project. +type ListDatabasesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. A parent name of the form + // `projects/{project_id}` + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // If true, also returns deleted resources. + ShowDeleted bool `protobuf:"varint,4,opt,name=show_deleted,json=showDeleted,proto3" json:"show_deleted,omitempty"` +} + +func (x *ListDatabasesRequest) Reset() { + *x = ListDatabasesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDatabasesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDatabasesRequest) ProtoMessage() {} + +func (x *ListDatabasesRequest) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDatabasesRequest.ProtoReflect.Descriptor instead. +func (*ListDatabasesRequest) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{0} +} + +func (x *ListDatabasesRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListDatabasesRequest) GetShowDeleted() bool { + if x != nil { + return x.ShowDeleted + } + return false +} + +// The request for +// [FirestoreAdmin.CreateDatabase][mockgcp.firestore.admin.v1.FirestoreAdmin.CreateDatabase]. +type CreateDatabaseRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. A parent name of the form + // `projects/{project_id}` + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The Database to create. + Database *Database `protobuf:"bytes,2,opt,name=database,proto3" json:"database,omitempty"` + // Required. The ID to use for the database, which will become the final + // component of the database's resource name. + // + // This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + // with first character a letter and the last a letter or a number. Must not + // be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + // + // "(default)" database id is also valid. + DatabaseId string `protobuf:"bytes,3,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` +} + +func (x *CreateDatabaseRequest) Reset() { + *x = CreateDatabaseRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateDatabaseRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateDatabaseRequest) ProtoMessage() {} + +func (x *CreateDatabaseRequest) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateDatabaseRequest.ProtoReflect.Descriptor instead. +func (*CreateDatabaseRequest) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateDatabaseRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateDatabaseRequest) GetDatabase() *Database { + if x != nil { + return x.Database + } + return nil +} + +func (x *CreateDatabaseRequest) GetDatabaseId() string { + if x != nil { + return x.DatabaseId + } + return "" +} + +// Metadata related to the create database operation. +type CreateDatabaseMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CreateDatabaseMetadata) Reset() { + *x = CreateDatabaseMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateDatabaseMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateDatabaseMetadata) ProtoMessage() {} + +func (x *CreateDatabaseMetadata) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateDatabaseMetadata.ProtoReflect.Descriptor instead. +func (*CreateDatabaseMetadata) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{2} +} + +// The list of databases for a project. +type ListDatabasesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The databases in the project. + Databases []*Database `protobuf:"bytes,1,rep,name=databases,proto3" json:"databases,omitempty"` + // In the event that data about individual databases cannot be listed they + // will be recorded here. + // + // An example entry might be: projects/some_project/locations/some_location + // This can happen if the Cloud Region that the Database resides in is + // currently unavailable. In this case we can't fetch all the details about + // the database. You may be able to get a more detailed error message + // (or possibly fetch the resource) by sending a 'Get' request for the + // resource or a 'List' request for the specific location. + Unreachable []string `protobuf:"bytes,3,rep,name=unreachable,proto3" json:"unreachable,omitempty"` +} + +func (x *ListDatabasesResponse) Reset() { + *x = ListDatabasesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDatabasesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDatabasesResponse) ProtoMessage() {} + +func (x *ListDatabasesResponse) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDatabasesResponse.ProtoReflect.Descriptor instead. +func (*ListDatabasesResponse) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{3} +} + +func (x *ListDatabasesResponse) GetDatabases() []*Database { + if x != nil { + return x.Databases + } + return nil +} + +func (x *ListDatabasesResponse) GetUnreachable() []string { + if x != nil { + return x.Unreachable + } + return nil +} + +// The request for +// [FirestoreAdmin.GetDatabase][mockgcp.firestore.admin.v1.FirestoreAdmin.GetDatabase]. +type GetDatabaseRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. A name of the form + // `projects/{project_id}/databases/{database_id}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetDatabaseRequest) Reset() { + *x = GetDatabaseRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDatabaseRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDatabaseRequest) ProtoMessage() {} + +func (x *GetDatabaseRequest) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDatabaseRequest.ProtoReflect.Descriptor instead. +func (*GetDatabaseRequest) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{4} +} + +func (x *GetDatabaseRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// The request for +// [FirestoreAdmin.UpdateDatabase][mockgcp.firestore.admin.v1.FirestoreAdmin.UpdateDatabase]. +type UpdateDatabaseRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The database to update. + Database *Database `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"` + // The list of fields to be updated. + UpdateMask *field_mask.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateDatabaseRequest) Reset() { + *x = UpdateDatabaseRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateDatabaseRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateDatabaseRequest) ProtoMessage() {} + +func (x *UpdateDatabaseRequest) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateDatabaseRequest.ProtoReflect.Descriptor instead. +func (*UpdateDatabaseRequest) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{5} +} + +func (x *UpdateDatabaseRequest) GetDatabase() *Database { + if x != nil { + return x.Database + } + return nil +} + +func (x *UpdateDatabaseRequest) GetUpdateMask() *field_mask.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// Metadata related to the update database operation. +type UpdateDatabaseMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpdateDatabaseMetadata) Reset() { + *x = UpdateDatabaseMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateDatabaseMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateDatabaseMetadata) ProtoMessage() {} + +func (x *UpdateDatabaseMetadata) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateDatabaseMetadata.ProtoReflect.Descriptor instead. +func (*UpdateDatabaseMetadata) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{6} +} + +// The request for +// [FirestoreAdmin.DeleteDatabase][mockgcp.firestore.admin.v1.FirestoreAdmin.DeleteDatabase]. +type DeleteDatabaseRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. A name of the form + // `projects/{project_id}/databases/{database_id}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The current etag of the Database. + // If an etag is provided and does not match the current etag of the database, + // deletion will be blocked and a FAILED_PRECONDITION error will be returned. + Etag string `protobuf:"bytes,3,opt,name=etag,proto3" json:"etag,omitempty"` +} + +func (x *DeleteDatabaseRequest) Reset() { + *x = DeleteDatabaseRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteDatabaseRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteDatabaseRequest) ProtoMessage() {} + +func (x *DeleteDatabaseRequest) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteDatabaseRequest.ProtoReflect.Descriptor instead. +func (*DeleteDatabaseRequest) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{7} +} + +func (x *DeleteDatabaseRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DeleteDatabaseRequest) GetEtag() string { + if x != nil { + return x.Etag + } + return "" +} + +// Metadata related to the delete database operation. +type DeleteDatabaseMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteDatabaseMetadata) Reset() { + *x = DeleteDatabaseMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteDatabaseMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteDatabaseMetadata) ProtoMessage() {} + +func (x *DeleteDatabaseMetadata) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteDatabaseMetadata.ProtoReflect.Descriptor instead. +func (*DeleteDatabaseMetadata) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{8} +} + +// The request for +// [FirestoreAdmin.CreateBackupSchedule][mockgcp.firestore.admin.v1.FirestoreAdmin.CreateBackupSchedule]. +type CreateBackupScheduleRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The parent database. + // + // Format `projects/{project}/databases/{database}` + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The backup schedule to create. + BackupSchedule *BackupSchedule `protobuf:"bytes,2,opt,name=backup_schedule,json=backupSchedule,proto3" json:"backup_schedule,omitempty"` +} + +func (x *CreateBackupScheduleRequest) Reset() { + *x = CreateBackupScheduleRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateBackupScheduleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateBackupScheduleRequest) ProtoMessage() {} + +func (x *CreateBackupScheduleRequest) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateBackupScheduleRequest.ProtoReflect.Descriptor instead. +func (*CreateBackupScheduleRequest) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{9} +} + +func (x *CreateBackupScheduleRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateBackupScheduleRequest) GetBackupSchedule() *BackupSchedule { + if x != nil { + return x.BackupSchedule + } + return nil +} + +// The request for +// [FirestoreAdmin.GetBackupSchedule][mockgcp.firestore.admin.v1.FirestoreAdmin.GetBackupSchedule]. +type GetBackupScheduleRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the backup schedule. + // + // Format + // `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetBackupScheduleRequest) Reset() { + *x = GetBackupScheduleRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBackupScheduleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBackupScheduleRequest) ProtoMessage() {} + +func (x *GetBackupScheduleRequest) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBackupScheduleRequest.ProtoReflect.Descriptor instead. +func (*GetBackupScheduleRequest) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{10} +} + +func (x *GetBackupScheduleRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// The request for +// [FirestoreAdmin.UpdateBackupSchedule][mockgcp.firestore.admin.v1.FirestoreAdmin.UpdateBackupSchedule]. +type UpdateBackupScheduleRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The backup schedule to update. + BackupSchedule *BackupSchedule `protobuf:"bytes,1,opt,name=backup_schedule,json=backupSchedule,proto3" json:"backup_schedule,omitempty"` + // The list of fields to be updated. + UpdateMask *field_mask.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateBackupScheduleRequest) Reset() { + *x = UpdateBackupScheduleRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateBackupScheduleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateBackupScheduleRequest) ProtoMessage() {} + +func (x *UpdateBackupScheduleRequest) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateBackupScheduleRequest.ProtoReflect.Descriptor instead. +func (*UpdateBackupScheduleRequest) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{11} +} + +func (x *UpdateBackupScheduleRequest) GetBackupSchedule() *BackupSchedule { + if x != nil { + return x.BackupSchedule + } + return nil +} + +func (x *UpdateBackupScheduleRequest) GetUpdateMask() *field_mask.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// The request for +// [FirestoreAdmin.ListBackupSchedules][mockgcp.firestore.admin.v1.FirestoreAdmin.ListBackupSchedules]. +type ListBackupSchedulesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The parent database. + // + // Format is `projects/{project}/databases/{database}`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` +} + +func (x *ListBackupSchedulesRequest) Reset() { + *x = ListBackupSchedulesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListBackupSchedulesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListBackupSchedulesRequest) ProtoMessage() {} + +func (x *ListBackupSchedulesRequest) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListBackupSchedulesRequest.ProtoReflect.Descriptor instead. +func (*ListBackupSchedulesRequest) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{12} +} + +func (x *ListBackupSchedulesRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +// The response for +// [FirestoreAdmin.ListBackupSchedules][mockgcp.firestore.admin.v1.FirestoreAdmin.ListBackupSchedules]. +type ListBackupSchedulesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of all backup schedules. + BackupSchedules []*BackupSchedule `protobuf:"bytes,1,rep,name=backup_schedules,json=backupSchedules,proto3" json:"backup_schedules,omitempty"` +} + +func (x *ListBackupSchedulesResponse) Reset() { + *x = ListBackupSchedulesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListBackupSchedulesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListBackupSchedulesResponse) ProtoMessage() {} + +func (x *ListBackupSchedulesResponse) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListBackupSchedulesResponse.ProtoReflect.Descriptor instead. +func (*ListBackupSchedulesResponse) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{13} +} + +func (x *ListBackupSchedulesResponse) GetBackupSchedules() []*BackupSchedule { + if x != nil { + return x.BackupSchedules + } + return nil +} + +// The request for [FirestoreAdmin.DeleteBackupSchedules][]. +type DeleteBackupScheduleRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the backup schedule. + // + // Format + // `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteBackupScheduleRequest) Reset() { + *x = DeleteBackupScheduleRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteBackupScheduleRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteBackupScheduleRequest) ProtoMessage() {} + +func (x *DeleteBackupScheduleRequest) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteBackupScheduleRequest.ProtoReflect.Descriptor instead. +func (*DeleteBackupScheduleRequest) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{14} +} + +func (x *DeleteBackupScheduleRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// The request for +// [FirestoreAdmin.CreateIndex][mockgcp.firestore.admin.v1.FirestoreAdmin.CreateIndex]. +type CreateIndexRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. A parent name of the form + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The composite index to create. + Index *Index `protobuf:"bytes,2,opt,name=index,proto3" json:"index,omitempty"` +} + +func (x *CreateIndexRequest) Reset() { + *x = CreateIndexRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateIndexRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateIndexRequest) ProtoMessage() {} + +func (x *CreateIndexRequest) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateIndexRequest.ProtoReflect.Descriptor instead. +func (*CreateIndexRequest) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{15} +} + +func (x *CreateIndexRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateIndexRequest) GetIndex() *Index { + if x != nil { + return x.Index + } + return nil +} + +// The request for +// [FirestoreAdmin.ListIndexes][mockgcp.firestore.admin.v1.FirestoreAdmin.ListIndexes]. +type ListIndexesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. A parent name of the form + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The filter to apply to list results. + Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` + // The number of results to return. + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A page token, returned from a previous call to + // [FirestoreAdmin.ListIndexes][mockgcp.firestore.admin.v1.FirestoreAdmin.ListIndexes], + // that may be used to get the next page of results. + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListIndexesRequest) Reset() { + *x = ListIndexesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListIndexesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListIndexesRequest) ProtoMessage() {} + +func (x *ListIndexesRequest) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListIndexesRequest.ProtoReflect.Descriptor instead. +func (*ListIndexesRequest) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{16} +} + +func (x *ListIndexesRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListIndexesRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListIndexesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListIndexesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// The response for +// [FirestoreAdmin.ListIndexes][mockgcp.firestore.admin.v1.FirestoreAdmin.ListIndexes]. +type ListIndexesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The requested indexes. + Indexes []*Index `protobuf:"bytes,1,rep,name=indexes,proto3" json:"indexes,omitempty"` + // A page token that may be used to request another page of results. If blank, + // this is the last page. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListIndexesResponse) Reset() { + *x = ListIndexesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListIndexesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListIndexesResponse) ProtoMessage() {} + +func (x *ListIndexesResponse) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListIndexesResponse.ProtoReflect.Descriptor instead. +func (*ListIndexesResponse) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{17} +} + +func (x *ListIndexesResponse) GetIndexes() []*Index { + if x != nil { + return x.Indexes + } + return nil +} + +func (x *ListIndexesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// The request for +// [FirestoreAdmin.GetIndex][mockgcp.firestore.admin.v1.FirestoreAdmin.GetIndex]. +type GetIndexRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. A name of the form + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetIndexRequest) Reset() { + *x = GetIndexRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetIndexRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetIndexRequest) ProtoMessage() {} + +func (x *GetIndexRequest) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetIndexRequest.ProtoReflect.Descriptor instead. +func (*GetIndexRequest) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{18} +} + +func (x *GetIndexRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// The request for +// [FirestoreAdmin.DeleteIndex][mockgcp.firestore.admin.v1.FirestoreAdmin.DeleteIndex]. +type DeleteIndexRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. A name of the form + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteIndexRequest) Reset() { + *x = DeleteIndexRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteIndexRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteIndexRequest) ProtoMessage() {} + +func (x *DeleteIndexRequest) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteIndexRequest.ProtoReflect.Descriptor instead. +func (*DeleteIndexRequest) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{19} +} + +func (x *DeleteIndexRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// The request for +// [FirestoreAdmin.UpdateField][mockgcp.firestore.admin.v1.FirestoreAdmin.UpdateField]. +type UpdateFieldRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The field to be updated. + Field *Field `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` + // A mask, relative to the field. If specified, only configuration specified + // by this field_mask will be updated in the field. + UpdateMask *field_mask.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` +} + +func (x *UpdateFieldRequest) Reset() { + *x = UpdateFieldRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateFieldRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateFieldRequest) ProtoMessage() {} + +func (x *UpdateFieldRequest) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateFieldRequest.ProtoReflect.Descriptor instead. +func (*UpdateFieldRequest) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{20} +} + +func (x *UpdateFieldRequest) GetField() *Field { + if x != nil { + return x.Field + } + return nil +} + +func (x *UpdateFieldRequest) GetUpdateMask() *field_mask.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +// The request for +// [FirestoreAdmin.GetField][mockgcp.firestore.admin.v1.FirestoreAdmin.GetField]. +type GetFieldRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. A name of the form + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetFieldRequest) Reset() { + *x = GetFieldRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetFieldRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetFieldRequest) ProtoMessage() {} + +func (x *GetFieldRequest) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetFieldRequest.ProtoReflect.Descriptor instead. +func (*GetFieldRequest) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{21} +} + +func (x *GetFieldRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// The request for +// [FirestoreAdmin.ListFields][mockgcp.firestore.admin.v1.FirestoreAdmin.ListFields]. +type ListFieldsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. A parent name of the form + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // The filter to apply to list results. Currently, + // [FirestoreAdmin.ListFields][mockgcp.firestore.admin.v1.FirestoreAdmin.ListFields] + // only supports listing fields that have been explicitly overridden. To issue + // this query, call + // [FirestoreAdmin.ListFields][mockgcp.firestore.admin.v1.FirestoreAdmin.ListFields] + // with a filter that includes `indexConfig.usesAncestorConfig:false` or + // `ttlConfig:*`. + Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"` + // The number of results to return. + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // A page token, returned from a previous call to + // [FirestoreAdmin.ListFields][mockgcp.firestore.admin.v1.FirestoreAdmin.ListFields], + // that may be used to get the next page of results. + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` +} + +func (x *ListFieldsRequest) Reset() { + *x = ListFieldsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListFieldsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListFieldsRequest) ProtoMessage() {} + +func (x *ListFieldsRequest) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListFieldsRequest.ProtoReflect.Descriptor instead. +func (*ListFieldsRequest) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{22} +} + +func (x *ListFieldsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListFieldsRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListFieldsRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListFieldsRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +// The response for +// [FirestoreAdmin.ListFields][mockgcp.firestore.admin.v1.FirestoreAdmin.ListFields]. +type ListFieldsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The requested fields. + Fields []*Field `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty"` + // A page token that may be used to request another page of results. If blank, + // this is the last page. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` +} + +func (x *ListFieldsResponse) Reset() { + *x = ListFieldsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListFieldsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListFieldsResponse) ProtoMessage() {} + +func (x *ListFieldsResponse) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListFieldsResponse.ProtoReflect.Descriptor instead. +func (*ListFieldsResponse) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{23} +} + +func (x *ListFieldsResponse) GetFields() []*Field { + if x != nil { + return x.Fields + } + return nil +} + +func (x *ListFieldsResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +// The request for +// [FirestoreAdmin.ExportDocuments][mockgcp.firestore.admin.v1.FirestoreAdmin.ExportDocuments]. +type ExportDocumentsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Database to export. Should be of the form: + // `projects/{project_id}/databases/{database_id}`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Which collection ids to export. Unspecified means all collections. Each + // collection id in this list must be unique. + CollectionIds []string `protobuf:"bytes,2,rep,name=collection_ids,json=collectionIds,proto3" json:"collection_ids,omitempty"` + // The output URI. Currently only supports Google Cloud Storage URIs of the + // form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name + // of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional + // Google Cloud Storage namespace path. When + // choosing a name, be sure to consider Google Cloud Storage naming + // guidelines: https://cloud.google.com/storage/docs/naming. + // If the URI is a bucket (without a namespace path), a prefix will be + // generated based on the start time. + OutputUriPrefix string `protobuf:"bytes,3,opt,name=output_uri_prefix,json=outputUriPrefix,proto3" json:"output_uri_prefix,omitempty"` + // An empty list represents all namespaces. This is the preferred + // usage for databases that don't use namespaces. + // + // An empty string element represents the default namespace. This should be + // used if the database has data in non-default namespaces, but doesn't want + // to include them. Each namespace in this list must be unique. + NamespaceIds []string `protobuf:"bytes,4,rep,name=namespace_ids,json=namespaceIds,proto3" json:"namespace_ids,omitempty"` + // The timestamp that corresponds to the version of the database to be + // exported. The timestamp must be in the past, rounded to the minute and not + // older than + // [earliestVersionTime][mockgcp.firestore.admin.v1.Database.earliest_version_time]. + // If specified, then the exported documents will represent a consistent view + // of the database at the provided time. Otherwise, there are no guarantees + // about the consistency of the exported documents. + SnapshotTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=snapshot_time,json=snapshotTime,proto3" json:"snapshot_time,omitempty"` +} + +func (x *ExportDocumentsRequest) Reset() { + *x = ExportDocumentsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExportDocumentsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportDocumentsRequest) ProtoMessage() {} + +func (x *ExportDocumentsRequest) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExportDocumentsRequest.ProtoReflect.Descriptor instead. +func (*ExportDocumentsRequest) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{24} +} + +func (x *ExportDocumentsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ExportDocumentsRequest) GetCollectionIds() []string { + if x != nil { + return x.CollectionIds + } + return nil +} + +func (x *ExportDocumentsRequest) GetOutputUriPrefix() string { + if x != nil { + return x.OutputUriPrefix + } + return "" +} + +func (x *ExportDocumentsRequest) GetNamespaceIds() []string { + if x != nil { + return x.NamespaceIds + } + return nil +} + +func (x *ExportDocumentsRequest) GetSnapshotTime() *timestamp.Timestamp { + if x != nil { + return x.SnapshotTime + } + return nil +} + +// The request for +// [FirestoreAdmin.ImportDocuments][mockgcp.firestore.admin.v1.FirestoreAdmin.ImportDocuments]. +type ImportDocumentsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Database to import into. Should be of the form: + // `projects/{project_id}/databases/{database_id}`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Which collection ids to import. Unspecified means all collections included + // in the import. Each collection id in this list must be unique. + CollectionIds []string `protobuf:"bytes,2,rep,name=collection_ids,json=collectionIds,proto3" json:"collection_ids,omitempty"` + // Location of the exported files. + // This must match the output_uri_prefix of an ExportDocumentsResponse from + // an export that has completed successfully. + // See: + // [mockgcp.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][mockgcp.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. + InputUriPrefix string `protobuf:"bytes,3,opt,name=input_uri_prefix,json=inputUriPrefix,proto3" json:"input_uri_prefix,omitempty"` + // An empty list represents all namespaces. This is the preferred + // usage for databases that don't use namespaces. + // + // An empty string element represents the default namespace. This should be + // used if the database has data in non-default namespaces, but doesn't want + // to include them. Each namespace in this list must be unique. + NamespaceIds []string `protobuf:"bytes,4,rep,name=namespace_ids,json=namespaceIds,proto3" json:"namespace_ids,omitempty"` +} + +func (x *ImportDocumentsRequest) Reset() { + *x = ImportDocumentsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImportDocumentsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImportDocumentsRequest) ProtoMessage() {} + +func (x *ImportDocumentsRequest) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImportDocumentsRequest.ProtoReflect.Descriptor instead. +func (*ImportDocumentsRequest) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{25} +} + +func (x *ImportDocumentsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ImportDocumentsRequest) GetCollectionIds() []string { + if x != nil { + return x.CollectionIds + } + return nil +} + +func (x *ImportDocumentsRequest) GetInputUriPrefix() string { + if x != nil { + return x.InputUriPrefix + } + return "" +} + +func (x *ImportDocumentsRequest) GetNamespaceIds() []string { + if x != nil { + return x.NamespaceIds + } + return nil +} + +// The request for +// [FirestoreAdmin.BulkDeleteDocuments][mockgcp.firestore.admin.v1.FirestoreAdmin.BulkDeleteDocuments]. +// +// When both collection_ids and namespace_ids are set, only documents satisfying +// both conditions will be deleted. +// +// Requests with namespace_ids and collection_ids both empty will be rejected. +// Please use +// [FirestoreAdmin.DeleteDatabase][mockgcp.firestore.admin.v1.FirestoreAdmin.DeleteDatabase] +// instead. +type BulkDeleteDocumentsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Database to operate. Should be of the form: + // `projects/{project_id}/databases/{database_id}`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. IDs of the collection groups to delete. Unspecified means all + // collection groups. + // + // Each collection group in this list must be unique. + CollectionIds []string `protobuf:"bytes,2,rep,name=collection_ids,json=collectionIds,proto3" json:"collection_ids,omitempty"` + // Optional. Namespaces to delete. + // + // An empty list means all namespaces. This is the recommended + // usage for databases that don't use namespaces. + // + // An empty string element represents the default namespace. This should be + // used if the database has data in non-default namespaces, but doesn't want + // to delete from them. + // + // Each namespace in this list must be unique. + NamespaceIds []string `protobuf:"bytes,3,rep,name=namespace_ids,json=namespaceIds,proto3" json:"namespace_ids,omitempty"` +} + +func (x *BulkDeleteDocumentsRequest) Reset() { + *x = BulkDeleteDocumentsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BulkDeleteDocumentsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BulkDeleteDocumentsRequest) ProtoMessage() {} + +func (x *BulkDeleteDocumentsRequest) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BulkDeleteDocumentsRequest.ProtoReflect.Descriptor instead. +func (*BulkDeleteDocumentsRequest) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{26} +} + +func (x *BulkDeleteDocumentsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *BulkDeleteDocumentsRequest) GetCollectionIds() []string { + if x != nil { + return x.CollectionIds + } + return nil +} + +func (x *BulkDeleteDocumentsRequest) GetNamespaceIds() []string { + if x != nil { + return x.NamespaceIds + } + return nil +} + +// The response for +// [FirestoreAdmin.BulkDeleteDocuments][mockgcp.firestore.admin.v1.FirestoreAdmin.BulkDeleteDocuments]. +type BulkDeleteDocumentsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *BulkDeleteDocumentsResponse) Reset() { + *x = BulkDeleteDocumentsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BulkDeleteDocumentsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BulkDeleteDocumentsResponse) ProtoMessage() {} + +func (x *BulkDeleteDocumentsResponse) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BulkDeleteDocumentsResponse.ProtoReflect.Descriptor instead. +func (*BulkDeleteDocumentsResponse) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{27} +} + +// The request for +// [FirestoreAdmin.GetBackup][mockgcp.firestore.admin.v1.FirestoreAdmin.GetBackup]. +type GetBackupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Name of the backup to fetch. + // + // Format is `projects/{project}/locations/{location}/backups/{backup}`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetBackupRequest) Reset() { + *x = GetBackupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBackupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBackupRequest) ProtoMessage() {} + +func (x *GetBackupRequest) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBackupRequest.ProtoReflect.Descriptor instead. +func (*GetBackupRequest) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{28} +} + +func (x *GetBackupRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// The request for +// [FirestoreAdmin.ListBackups][mockgcp.firestore.admin.v1.FirestoreAdmin.ListBackups]. +type ListBackupsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The location to list backups from. + // + // Format is `projects/{project}/locations/{location}`. + // Use `{location} = '-'` to list backups from all locations for the given + // project. This allows listing backups from a single location or from all + // locations. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` +} + +func (x *ListBackupsRequest) Reset() { + *x = ListBackupsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListBackupsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListBackupsRequest) ProtoMessage() {} + +func (x *ListBackupsRequest) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[29] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListBackupsRequest.ProtoReflect.Descriptor instead. +func (*ListBackupsRequest) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{29} +} + +func (x *ListBackupsRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +// The response for +// [FirestoreAdmin.ListBackups][mockgcp.firestore.admin.v1.FirestoreAdmin.ListBackups]. +type ListBackupsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // List of all backups for the project. + Backups []*Backup `protobuf:"bytes,1,rep,name=backups,proto3" json:"backups,omitempty"` + // List of locations that existing backups were not able to be fetched from. + // + // Instead of failing the entire requests when a single location is + // unreachable, this response returns a partial result set and list of + // locations unable to be reached here. The request can be retried against a + // single location to get a concrete error. + Unreachable []string `protobuf:"bytes,3,rep,name=unreachable,proto3" json:"unreachable,omitempty"` +} + +func (x *ListBackupsResponse) Reset() { + *x = ListBackupsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListBackupsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListBackupsResponse) ProtoMessage() {} + +func (x *ListBackupsResponse) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[30] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListBackupsResponse.ProtoReflect.Descriptor instead. +func (*ListBackupsResponse) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{30} +} + +func (x *ListBackupsResponse) GetBackups() []*Backup { + if x != nil { + return x.Backups + } + return nil +} + +func (x *ListBackupsResponse) GetUnreachable() []string { + if x != nil { + return x.Unreachable + } + return nil +} + +// The request for +// [FirestoreAdmin.DeleteBackup][mockgcp.firestore.admin.v1.FirestoreAdmin.DeleteBackup]. +type DeleteBackupRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Name of the backup to delete. + // + // format is `projects/{project}/locations/{location}/backups/{backup}`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *DeleteBackupRequest) Reset() { + *x = DeleteBackupRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteBackupRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteBackupRequest) ProtoMessage() {} + +func (x *DeleteBackupRequest) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[31] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteBackupRequest.ProtoReflect.Descriptor instead. +func (*DeleteBackupRequest) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{31} +} + +func (x *DeleteBackupRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// The request message for +// [FirestoreAdmin.RestoreDatabase][mockgcp.firestore.admin.v1.RestoreDatabase]. +type RestoreDatabaseRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The project to restore the database in. Format is + // `projects/{project_id}`. + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. The ID to use for the database, which will become the final + // component of the database's resource name. This database id must not be + // associated with an existing database. + // + // This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + // with first character a letter and the last a letter or a number. Must not + // be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + // + // "(default)" database id is also valid. + DatabaseId string `protobuf:"bytes,2,opt,name=database_id,json=databaseId,proto3" json:"database_id,omitempty"` + // Required. Backup to restore from. Must be from the same project as the + // parent. + // + // Format is: `projects/{project_id}/locations/{location}/backups/{backup}` + Backup string `protobuf:"bytes,3,opt,name=backup,proto3" json:"backup,omitempty"` +} + +func (x *RestoreDatabaseRequest) Reset() { + *x = RestoreDatabaseRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RestoreDatabaseRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RestoreDatabaseRequest) ProtoMessage() {} + +func (x *RestoreDatabaseRequest) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[32] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RestoreDatabaseRequest.ProtoReflect.Descriptor instead. +func (*RestoreDatabaseRequest) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP(), []int{32} +} + +func (x *RestoreDatabaseRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *RestoreDatabaseRequest) GetDatabaseId() string { + if x != nil { + return x.DatabaseId + } + return "" +} + +func (x *RestoreDatabaseRequest) GetBackup() string { + if x != nil { + return x.Backup + } + return "" +} + +var File_mockgcp_firestore_admin_v1_firestore_admin_proto protoreflect.FileDescriptor + +var file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDesc = []byte{ + 0x0a, 0x30, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x69, 0x72, + 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x1a, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x1c, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x27, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, + 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x6d, 0x6f, 0x63, 0x6b, + 0x67, 0x63, 0x70, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2f, 0x66, + 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, + 0x31, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x6d, + 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2f, 0x66, + 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, + 0x31, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x29, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, + 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x7c, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, + 0x23, 0x12, 0x21, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, 0x61, + 0x62, 0x61, 0x73, 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, + 0x73, 0x68, 0x6f, 0x77, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0b, 0x73, 0x68, 0x6f, 0x77, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, + 0xc7, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, + 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, + 0x23, 0x12, 0x21, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, 0x61, + 0x62, 0x61, 0x73, 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x08, + 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, + 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x62, 0x61, 0x73, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, + 0x61, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x64, + 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x49, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x22, 0x7d, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, + 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x09, + 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, + 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x09, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, + 0x12, 0x20, 0x0a, 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, + 0x6c, 0x65, 0x22, 0x53, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, + 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, + 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x45, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, + 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, + 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x18, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, + 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, + 0x6a, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, + 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, + 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x74, 0x61, 0x67, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x65, 0x74, 0x61, 0x67, 0x22, 0x18, 0x0a, 0x16, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0xba, 0x01, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x66, + 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, + 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x58, 0x0a, 0x0f, 0x62, 0x61, 0x63, 0x6b, + 0x75, 0x70, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, + 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x0e, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, + 0x6c, 0x65, 0x22, 0x5f, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, + 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x43, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2f, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x29, 0x0a, 0x27, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, + 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0xb4, 0x01, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, + 0x63, 0x6b, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x58, 0x0a, 0x0f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x73, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6d, + 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, + 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0e, 0x62, + 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x3b, 0x0a, + 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x5f, 0x0a, 0x1a, 0x4c, 0x69, + 0x73, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, + 0x0a, 0x21, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, 0x61, 0x62, + 0x61, 0x73, 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x22, 0x74, 0x0a, 0x1b, 0x4c, + 0x69, 0x73, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x10, 0x62, 0x61, + 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, + 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x52, 0x0f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x73, 0x22, 0x62, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, + 0x70, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x43, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2f, + 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x29, 0x0a, 0x27, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, + 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x9c, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x48, 0x0a, 0x06, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x2a, 0x0a, 0x28, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, + 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, + 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x05, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x22, 0xb2, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x48, 0x0a, 0x06, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xe0, 0x41, 0x02, + 0xfa, 0x41, 0x2a, 0x0a, 0x28, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x6f, + 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, + 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x7a, 0x0a, 0x13, 0x4c, 0x69, 0x73, + 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x3b, 0x0a, 0x07, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x52, 0x07, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x12, 0x26, 0x0a, + 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x4d, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x20, 0x0a, 0x1e, + 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x50, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x20, + 0x0a, 0x1e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x8f, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, + 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, + 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x4d, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0xe0, 0x41, 0x02, 0xfa, 0x41, + 0x20, 0x0a, 0x1e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xb1, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x48, 0x0a, + 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xe0, + 0x41, 0x02, 0xfa, 0x41, 0x2a, 0x0a, 0x28, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, + 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, + 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, + 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x77, 0x0a, 0x12, 0x4c, + 0x69, 0x73, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x39, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x26, 0x0a, 0x0f, + 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x90, 0x02, 0x0a, 0x16, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, + 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x3d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, + 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, + 0x0a, 0x0e, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, + 0x75, 0x72, 0x69, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x55, 0x72, 0x69, 0x50, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x12, 0x23, 0x0a, 0x0d, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, + 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x49, 0x64, 0x73, 0x12, 0x3f, 0x0a, 0x0d, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0c, 0x73, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xcd, 0x01, 0x0a, 0x16, 0x49, 0x6d, 0x70, 0x6f, + 0x72, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6c, 0x6c, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x69, 0x6e, 0x70, 0x75, + 0x74, 0x5f, 0x75, 0x72, 0x69, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x55, 0x72, 0x69, 0x50, 0x72, 0x65, 0x66, + 0x69, 0x78, 0x12, 0x23, 0x0a, 0x0d, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, + 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x73, 0x22, 0xb1, 0x01, 0x0a, 0x1a, 0x42, 0x75, 0x6c, 0x6b, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x66, 0x69, + 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x0e, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x0d, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, + 0x73, 0x12, 0x28, 0x0a, 0x0d, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, + 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x73, 0x22, 0x1d, 0x0a, 0x1b, 0x42, + 0x75, 0x6c, 0x6b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, 0x0a, 0x10, 0x47, 0x65, + 0x74, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3b, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0xe0, 0x41, + 0x02, 0xfa, 0x41, 0x21, 0x0a, 0x1f, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, + 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x57, 0x0a, 0x12, 0x4c, + 0x69, 0x73, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x66, 0x69, 0x72, 0x65, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x22, 0x75, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x61, 0x63, 0x6b, + 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x62, + 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6d, + 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, + 0x52, 0x07, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x75, 0x6e, 0x72, + 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, + 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x52, 0x0a, 0x13, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x27, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x21, 0x0a, 0x1f, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, + 0xc2, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, + 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, + 0x41, 0x23, 0x12, 0x21, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, + 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x24, 0x0a, + 0x0b, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, + 0x65, 0x49, 0x64, 0x12, 0x3f, 0x0a, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x27, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x21, 0x0a, 0x1f, 0x66, 0x69, 0x72, + 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x06, 0x62, 0x61, + 0x63, 0x6b, 0x75, 0x70, 0x32, 0xef, 0x25, 0x0a, 0x0e, 0x46, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0xdc, 0x01, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2e, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, + 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x47, 0x22, 0x3e, + 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, + 0x2f, 0x2a, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x3a, 0x05, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0xda, 0x41, 0x0c, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0xca, 0x41, 0x1f, 0x0a, 0x05, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x16, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xbf, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x12, 0x2e, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, + 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, + 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, 0x12, + 0x3e, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, + 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0xda, + 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0xa9, 0x01, 0x0a, 0x08, 0x47, 0x65, 0x74, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2b, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, + 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, + 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x4d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, 0x12, 0x3e, 0x2f, + 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x2f, + 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, + 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xa4, 0x01, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2e, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, + 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x4d, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x40, 0x2a, 0x3e, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, + 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, + 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xa8, 0x01, 0x0a, 0x08, + 0x47, 0x65, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x2b, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, + 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, + 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x22, 0x4c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, + 0x12, 0x3d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, + 0x2f, 0x2a, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x73, 0x2f, 0x2a, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x2f, 0x2a, 0x7d, 0xda, + 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xda, 0x01, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x2e, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, + 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4c, 0x32, 0x43, 0x2f, + 0x76, 0x31, 0x2f, 0x7b, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, + 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x2a, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x2f, + 0x2a, 0x7d, 0x3a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0xda, 0x41, 0x05, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0xca, 0x41, 0x1f, 0x0a, 0x05, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x16, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0xbb, 0x01, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x73, 0x12, 0x2d, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, + 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x4e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x12, 0x3d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, + 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x63, 0x6f, + 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x2a, + 0x7d, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x12, 0xde, 0x01, 0x0a, 0x0f, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x32, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, + 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x78, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, + 0x22, 0x31, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, + 0x2f, 0x2a, 0x7d, 0x3a, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0xca, 0x41, 0x32, + 0x0a, 0x17, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x45, 0x78, 0x70, 0x6f, 0x72, + 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0xdc, 0x01, 0x0a, 0x0f, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x6f, 0x63, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x32, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, + 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x76, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x36, 0x22, 0x31, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, + 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0xca, 0x41, + 0x30, 0x0a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x17, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, + 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x12, 0xf3, 0x01, 0x0a, 0x13, 0x42, 0x75, 0x6c, 0x6b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x36, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, + 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x6c, 0x6b, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, + 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x84, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x22, 0x35, 0x2f, 0x76, 0x31, 0x2f, 0x7b, + 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x62, 0x75, 0x6c, + 0x6b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x3a, 0x01, 0x2a, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0xca, 0x41, 0x3a, 0x0a, 0x1b, 0x42, + 0x75, 0x6c, 0x6b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x42, 0x75, 0x6c, 0x6b, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xda, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x31, 0x2e, 0x6d, 0x6f, 0x63, + 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, + 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, + 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x76, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x2d, 0x22, 0x21, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x64, 0x61, + 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x3a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, + 0x65, 0xda, 0x41, 0x1b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x64, 0x61, 0x74, 0x61, 0x62, + 0x61, 0x73, 0x65, 0x2c, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x64, 0xca, + 0x41, 0x22, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x16, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x95, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, + 0x62, 0x61, 0x73, 0x65, 0x12, 0x2e, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, + 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, + 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x23, 0x12, 0x21, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, + 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xa8, 0x01, 0x0a, + 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x12, 0x30, + 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x31, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x76, 0x31, + 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0xda, 0x41, + 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0xdc, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x31, 0x2e, 0x6d, 0x6f, 0x63, + 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, + 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, + 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x78, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x36, 0x32, 0x2a, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x7d, + 0x3a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0xda, 0x41, 0x14, 0x64, 0x61, 0x74, + 0x61, 0x62, 0x61, 0x73, 0x65, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, + 0x6b, 0xca, 0x41, 0x22, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x16, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xb9, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x31, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, + 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x61, 0x74, + 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, + 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x55, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x23, 0x2a, 0x21, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, + 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0xca, 0x41, 0x22, + 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x16, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x99, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, + 0x12, 0x2c, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, + 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b, + 0x75, 0x70, 0x22, 0x3a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x76, 0x31, 0x2f, + 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, + 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x61, 0x63, + 0x6b, 0x75, 0x70, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xac, + 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x2e, + 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, + 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x62, 0x61, 0x63, + 0x6b, 0x75, 0x70, 0x73, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x93, 0x01, + 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x2f, + 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x3a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x2a, + 0x2b, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x2a, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0xc0, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x44, + 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x32, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, + 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, + 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, + 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5a, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x2e, 0x22, 0x29, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, + 0x62, 0x61, 0x73, 0x65, 0x73, 0x3a, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x3a, 0x01, 0x2a, + 0xca, 0x41, 0x23, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x17, 0x52, + 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xe2, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, + 0x37, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, + 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x22, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x46, 0x22, 0x33, 0x2f, 0x76, + 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, + 0x7d, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x73, 0x3a, 0x0f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, + 0x6c, 0x65, 0xda, 0x41, 0x16, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x62, 0x61, 0x63, 0x6b, + 0x75, 0x70, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0xb9, 0x01, 0x0a, 0x11, + 0x47, 0x65, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, + 0x65, 0x12, 0x34, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, + 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x64, + 0x75, 0x6c, 0x65, 0x22, 0x42, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, 0x2f, 0x76, 0x31, + 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, + 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x61, + 0x63, 0x6b, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x2a, 0x7d, + 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0xcc, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, + 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x12, + 0x36, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, + 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, + 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, + 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x62, 0x61, + 0x63, 0x6b, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x73, 0xda, 0x41, 0x06, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0xf7, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, + 0x37, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, + 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x22, 0x7a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x56, 0x32, 0x43, 0x2f, 0x76, + 0x31, 0x2f, 0x7b, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, + 0x6c, 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, + 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x62, + 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x2a, + 0x7d, 0x3a, 0x0f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, + 0x6c, 0x65, 0xda, 0x41, 0x1b, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x73, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, + 0x12, 0xab, 0x01, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x75, + 0x70, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x37, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, + 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x61, 0x63, + 0x6b, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x42, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x35, 0x2a, 0x33, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, + 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x64, + 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x1a, 0x76, + 0xca, 0x41, 0x18, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x58, 0x68, 0x74, + 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x68, 0x74, 0x74, + 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x64, 0x61, 0x74, + 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x42, 0xa6, 0x03, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, + 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x13, 0x46, 0x69, 0x72, 0x65, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x39, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x70, 0x62, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x70, 0x62, 0xa2, 0x02, 0x04, 0x47, 0x43, + 0x46, 0x53, 0xaa, 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x46, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, + 0x6f, 0x75, 0x64, 0x5c, 0x46, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5c, 0x41, 0x64, + 0x6d, 0x69, 0x6e, 0x5c, 0x56, 0x31, 0xea, 0x02, 0x23, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, + 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x46, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, + 0x65, 0x3a, 0x3a, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0xea, 0x41, 0x4c, 0x0a, + 0x21, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x27, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x7b, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0xea, 0x41, 0x71, 0x0a, 0x28, + 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x45, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, 0x64, 0x61, 0x74, + 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x7b, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, + 0x7d, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x73, 0x2f, 0x7b, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescOnce sync.Once + file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescData = file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDesc +) + +func file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescGZIP() []byte { + file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescOnce.Do(func() { + file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescData = protoimpl.X.CompressGZIP(file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescData) + }) + return file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDescData +} + +var file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes = make([]protoimpl.MessageInfo, 33) +var file_mockgcp_firestore_admin_v1_firestore_admin_proto_goTypes = []interface{}{ + (*ListDatabasesRequest)(nil), // 0: mockgcp.firestore.admin.v1.ListDatabasesRequest + (*CreateDatabaseRequest)(nil), // 1: mockgcp.firestore.admin.v1.CreateDatabaseRequest + (*CreateDatabaseMetadata)(nil), // 2: mockgcp.firestore.admin.v1.CreateDatabaseMetadata + (*ListDatabasesResponse)(nil), // 3: mockgcp.firestore.admin.v1.ListDatabasesResponse + (*GetDatabaseRequest)(nil), // 4: mockgcp.firestore.admin.v1.GetDatabaseRequest + (*UpdateDatabaseRequest)(nil), // 5: mockgcp.firestore.admin.v1.UpdateDatabaseRequest + (*UpdateDatabaseMetadata)(nil), // 6: mockgcp.firestore.admin.v1.UpdateDatabaseMetadata + (*DeleteDatabaseRequest)(nil), // 7: mockgcp.firestore.admin.v1.DeleteDatabaseRequest + (*DeleteDatabaseMetadata)(nil), // 8: mockgcp.firestore.admin.v1.DeleteDatabaseMetadata + (*CreateBackupScheduleRequest)(nil), // 9: mockgcp.firestore.admin.v1.CreateBackupScheduleRequest + (*GetBackupScheduleRequest)(nil), // 10: mockgcp.firestore.admin.v1.GetBackupScheduleRequest + (*UpdateBackupScheduleRequest)(nil), // 11: mockgcp.firestore.admin.v1.UpdateBackupScheduleRequest + (*ListBackupSchedulesRequest)(nil), // 12: mockgcp.firestore.admin.v1.ListBackupSchedulesRequest + (*ListBackupSchedulesResponse)(nil), // 13: mockgcp.firestore.admin.v1.ListBackupSchedulesResponse + (*DeleteBackupScheduleRequest)(nil), // 14: mockgcp.firestore.admin.v1.DeleteBackupScheduleRequest + (*CreateIndexRequest)(nil), // 15: mockgcp.firestore.admin.v1.CreateIndexRequest + (*ListIndexesRequest)(nil), // 16: mockgcp.firestore.admin.v1.ListIndexesRequest + (*ListIndexesResponse)(nil), // 17: mockgcp.firestore.admin.v1.ListIndexesResponse + (*GetIndexRequest)(nil), // 18: mockgcp.firestore.admin.v1.GetIndexRequest + (*DeleteIndexRequest)(nil), // 19: mockgcp.firestore.admin.v1.DeleteIndexRequest + (*UpdateFieldRequest)(nil), // 20: mockgcp.firestore.admin.v1.UpdateFieldRequest + (*GetFieldRequest)(nil), // 21: mockgcp.firestore.admin.v1.GetFieldRequest + (*ListFieldsRequest)(nil), // 22: mockgcp.firestore.admin.v1.ListFieldsRequest + (*ListFieldsResponse)(nil), // 23: mockgcp.firestore.admin.v1.ListFieldsResponse + (*ExportDocumentsRequest)(nil), // 24: mockgcp.firestore.admin.v1.ExportDocumentsRequest + (*ImportDocumentsRequest)(nil), // 25: mockgcp.firestore.admin.v1.ImportDocumentsRequest + (*BulkDeleteDocumentsRequest)(nil), // 26: mockgcp.firestore.admin.v1.BulkDeleteDocumentsRequest + (*BulkDeleteDocumentsResponse)(nil), // 27: mockgcp.firestore.admin.v1.BulkDeleteDocumentsResponse + (*GetBackupRequest)(nil), // 28: mockgcp.firestore.admin.v1.GetBackupRequest + (*ListBackupsRequest)(nil), // 29: mockgcp.firestore.admin.v1.ListBackupsRequest + (*ListBackupsResponse)(nil), // 30: mockgcp.firestore.admin.v1.ListBackupsResponse + (*DeleteBackupRequest)(nil), // 31: mockgcp.firestore.admin.v1.DeleteBackupRequest + (*RestoreDatabaseRequest)(nil), // 32: mockgcp.firestore.admin.v1.RestoreDatabaseRequest + (*Database)(nil), // 33: mockgcp.firestore.admin.v1.Database + (*field_mask.FieldMask)(nil), // 34: google.protobuf.FieldMask + (*BackupSchedule)(nil), // 35: mockgcp.firestore.admin.v1.BackupSchedule + (*Index)(nil), // 36: mockgcp.firestore.admin.v1.Index + (*Field)(nil), // 37: mockgcp.firestore.admin.v1.Field + (*timestamp.Timestamp)(nil), // 38: google.protobuf.Timestamp + (*Backup)(nil), // 39: mockgcp.firestore.admin.v1.Backup + (*longrunningpb.Operation)(nil), // 40: google.longrunning.Operation + (*empty.Empty)(nil), // 41: google.protobuf.Empty +} +var file_mockgcp_firestore_admin_v1_firestore_admin_proto_depIdxs = []int32{ + 33, // 0: mockgcp.firestore.admin.v1.CreateDatabaseRequest.database:type_name -> mockgcp.firestore.admin.v1.Database + 33, // 1: mockgcp.firestore.admin.v1.ListDatabasesResponse.databases:type_name -> mockgcp.firestore.admin.v1.Database + 33, // 2: mockgcp.firestore.admin.v1.UpdateDatabaseRequest.database:type_name -> mockgcp.firestore.admin.v1.Database + 34, // 3: mockgcp.firestore.admin.v1.UpdateDatabaseRequest.update_mask:type_name -> google.protobuf.FieldMask + 35, // 4: mockgcp.firestore.admin.v1.CreateBackupScheduleRequest.backup_schedule:type_name -> mockgcp.firestore.admin.v1.BackupSchedule + 35, // 5: mockgcp.firestore.admin.v1.UpdateBackupScheduleRequest.backup_schedule:type_name -> mockgcp.firestore.admin.v1.BackupSchedule + 34, // 6: mockgcp.firestore.admin.v1.UpdateBackupScheduleRequest.update_mask:type_name -> google.protobuf.FieldMask + 35, // 7: mockgcp.firestore.admin.v1.ListBackupSchedulesResponse.backup_schedules:type_name -> mockgcp.firestore.admin.v1.BackupSchedule + 36, // 8: mockgcp.firestore.admin.v1.CreateIndexRequest.index:type_name -> mockgcp.firestore.admin.v1.Index + 36, // 9: mockgcp.firestore.admin.v1.ListIndexesResponse.indexes:type_name -> mockgcp.firestore.admin.v1.Index + 37, // 10: mockgcp.firestore.admin.v1.UpdateFieldRequest.field:type_name -> mockgcp.firestore.admin.v1.Field + 34, // 11: mockgcp.firestore.admin.v1.UpdateFieldRequest.update_mask:type_name -> google.protobuf.FieldMask + 37, // 12: mockgcp.firestore.admin.v1.ListFieldsResponse.fields:type_name -> mockgcp.firestore.admin.v1.Field + 38, // 13: mockgcp.firestore.admin.v1.ExportDocumentsRequest.snapshot_time:type_name -> google.protobuf.Timestamp + 39, // 14: mockgcp.firestore.admin.v1.ListBackupsResponse.backups:type_name -> mockgcp.firestore.admin.v1.Backup + 15, // 15: mockgcp.firestore.admin.v1.FirestoreAdmin.CreateIndex:input_type -> mockgcp.firestore.admin.v1.CreateIndexRequest + 16, // 16: mockgcp.firestore.admin.v1.FirestoreAdmin.ListIndexes:input_type -> mockgcp.firestore.admin.v1.ListIndexesRequest + 18, // 17: mockgcp.firestore.admin.v1.FirestoreAdmin.GetIndex:input_type -> mockgcp.firestore.admin.v1.GetIndexRequest + 19, // 18: mockgcp.firestore.admin.v1.FirestoreAdmin.DeleteIndex:input_type -> mockgcp.firestore.admin.v1.DeleteIndexRequest + 21, // 19: mockgcp.firestore.admin.v1.FirestoreAdmin.GetField:input_type -> mockgcp.firestore.admin.v1.GetFieldRequest + 20, // 20: mockgcp.firestore.admin.v1.FirestoreAdmin.UpdateField:input_type -> mockgcp.firestore.admin.v1.UpdateFieldRequest + 22, // 21: mockgcp.firestore.admin.v1.FirestoreAdmin.ListFields:input_type -> mockgcp.firestore.admin.v1.ListFieldsRequest + 24, // 22: mockgcp.firestore.admin.v1.FirestoreAdmin.ExportDocuments:input_type -> mockgcp.firestore.admin.v1.ExportDocumentsRequest + 25, // 23: mockgcp.firestore.admin.v1.FirestoreAdmin.ImportDocuments:input_type -> mockgcp.firestore.admin.v1.ImportDocumentsRequest + 26, // 24: mockgcp.firestore.admin.v1.FirestoreAdmin.BulkDeleteDocuments:input_type -> mockgcp.firestore.admin.v1.BulkDeleteDocumentsRequest + 1, // 25: mockgcp.firestore.admin.v1.FirestoreAdmin.CreateDatabase:input_type -> mockgcp.firestore.admin.v1.CreateDatabaseRequest + 4, // 26: mockgcp.firestore.admin.v1.FirestoreAdmin.GetDatabase:input_type -> mockgcp.firestore.admin.v1.GetDatabaseRequest + 0, // 27: mockgcp.firestore.admin.v1.FirestoreAdmin.ListDatabases:input_type -> mockgcp.firestore.admin.v1.ListDatabasesRequest + 5, // 28: mockgcp.firestore.admin.v1.FirestoreAdmin.UpdateDatabase:input_type -> mockgcp.firestore.admin.v1.UpdateDatabaseRequest + 7, // 29: mockgcp.firestore.admin.v1.FirestoreAdmin.DeleteDatabase:input_type -> mockgcp.firestore.admin.v1.DeleteDatabaseRequest + 28, // 30: mockgcp.firestore.admin.v1.FirestoreAdmin.GetBackup:input_type -> mockgcp.firestore.admin.v1.GetBackupRequest + 29, // 31: mockgcp.firestore.admin.v1.FirestoreAdmin.ListBackups:input_type -> mockgcp.firestore.admin.v1.ListBackupsRequest + 31, // 32: mockgcp.firestore.admin.v1.FirestoreAdmin.DeleteBackup:input_type -> mockgcp.firestore.admin.v1.DeleteBackupRequest + 32, // 33: mockgcp.firestore.admin.v1.FirestoreAdmin.RestoreDatabase:input_type -> mockgcp.firestore.admin.v1.RestoreDatabaseRequest + 9, // 34: mockgcp.firestore.admin.v1.FirestoreAdmin.CreateBackupSchedule:input_type -> mockgcp.firestore.admin.v1.CreateBackupScheduleRequest + 10, // 35: mockgcp.firestore.admin.v1.FirestoreAdmin.GetBackupSchedule:input_type -> mockgcp.firestore.admin.v1.GetBackupScheduleRequest + 12, // 36: mockgcp.firestore.admin.v1.FirestoreAdmin.ListBackupSchedules:input_type -> mockgcp.firestore.admin.v1.ListBackupSchedulesRequest + 11, // 37: mockgcp.firestore.admin.v1.FirestoreAdmin.UpdateBackupSchedule:input_type -> mockgcp.firestore.admin.v1.UpdateBackupScheduleRequest + 14, // 38: mockgcp.firestore.admin.v1.FirestoreAdmin.DeleteBackupSchedule:input_type -> mockgcp.firestore.admin.v1.DeleteBackupScheduleRequest + 40, // 39: mockgcp.firestore.admin.v1.FirestoreAdmin.CreateIndex:output_type -> google.longrunning.Operation + 17, // 40: mockgcp.firestore.admin.v1.FirestoreAdmin.ListIndexes:output_type -> mockgcp.firestore.admin.v1.ListIndexesResponse + 36, // 41: mockgcp.firestore.admin.v1.FirestoreAdmin.GetIndex:output_type -> mockgcp.firestore.admin.v1.Index + 41, // 42: mockgcp.firestore.admin.v1.FirestoreAdmin.DeleteIndex:output_type -> google.protobuf.Empty + 37, // 43: mockgcp.firestore.admin.v1.FirestoreAdmin.GetField:output_type -> mockgcp.firestore.admin.v1.Field + 40, // 44: mockgcp.firestore.admin.v1.FirestoreAdmin.UpdateField:output_type -> google.longrunning.Operation + 23, // 45: mockgcp.firestore.admin.v1.FirestoreAdmin.ListFields:output_type -> mockgcp.firestore.admin.v1.ListFieldsResponse + 40, // 46: mockgcp.firestore.admin.v1.FirestoreAdmin.ExportDocuments:output_type -> google.longrunning.Operation + 40, // 47: mockgcp.firestore.admin.v1.FirestoreAdmin.ImportDocuments:output_type -> google.longrunning.Operation + 40, // 48: mockgcp.firestore.admin.v1.FirestoreAdmin.BulkDeleteDocuments:output_type -> google.longrunning.Operation + 40, // 49: mockgcp.firestore.admin.v1.FirestoreAdmin.CreateDatabase:output_type -> google.longrunning.Operation + 33, // 50: mockgcp.firestore.admin.v1.FirestoreAdmin.GetDatabase:output_type -> mockgcp.firestore.admin.v1.Database + 3, // 51: mockgcp.firestore.admin.v1.FirestoreAdmin.ListDatabases:output_type -> mockgcp.firestore.admin.v1.ListDatabasesResponse + 40, // 52: mockgcp.firestore.admin.v1.FirestoreAdmin.UpdateDatabase:output_type -> google.longrunning.Operation + 40, // 53: mockgcp.firestore.admin.v1.FirestoreAdmin.DeleteDatabase:output_type -> google.longrunning.Operation + 39, // 54: mockgcp.firestore.admin.v1.FirestoreAdmin.GetBackup:output_type -> mockgcp.firestore.admin.v1.Backup + 30, // 55: mockgcp.firestore.admin.v1.FirestoreAdmin.ListBackups:output_type -> mockgcp.firestore.admin.v1.ListBackupsResponse + 41, // 56: mockgcp.firestore.admin.v1.FirestoreAdmin.DeleteBackup:output_type -> google.protobuf.Empty + 40, // 57: mockgcp.firestore.admin.v1.FirestoreAdmin.RestoreDatabase:output_type -> google.longrunning.Operation + 35, // 58: mockgcp.firestore.admin.v1.FirestoreAdmin.CreateBackupSchedule:output_type -> mockgcp.firestore.admin.v1.BackupSchedule + 35, // 59: mockgcp.firestore.admin.v1.FirestoreAdmin.GetBackupSchedule:output_type -> mockgcp.firestore.admin.v1.BackupSchedule + 13, // 60: mockgcp.firestore.admin.v1.FirestoreAdmin.ListBackupSchedules:output_type -> mockgcp.firestore.admin.v1.ListBackupSchedulesResponse + 35, // 61: mockgcp.firestore.admin.v1.FirestoreAdmin.UpdateBackupSchedule:output_type -> mockgcp.firestore.admin.v1.BackupSchedule + 41, // 62: mockgcp.firestore.admin.v1.FirestoreAdmin.DeleteBackupSchedule:output_type -> google.protobuf.Empty + 39, // [39:63] is the sub-list for method output_type + 15, // [15:39] is the sub-list for method input_type + 15, // [15:15] is the sub-list for extension type_name + 15, // [15:15] is the sub-list for extension extendee + 0, // [0:15] is the sub-list for field type_name +} + +func init() { file_mockgcp_firestore_admin_v1_firestore_admin_proto_init() } +func file_mockgcp_firestore_admin_v1_firestore_admin_proto_init() { + if File_mockgcp_firestore_admin_v1_firestore_admin_proto != nil { + return + } + file_mockgcp_firestore_admin_v1_backup_proto_init() + file_mockgcp_firestore_admin_v1_database_proto_init() + file_mockgcp_firestore_admin_v1_field_proto_init() + file_mockgcp_firestore_admin_v1_index_proto_init() + file_mockgcp_firestore_admin_v1_operation_proto_init() + file_mockgcp_firestore_admin_v1_schedule_proto_init() + if !protoimpl.UnsafeEnabled { + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDatabasesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateDatabaseRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateDatabaseMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDatabasesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDatabaseRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateDatabaseRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateDatabaseMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteDatabaseRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteDatabaseMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateBackupScheduleRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetBackupScheduleRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateBackupScheduleRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListBackupSchedulesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListBackupSchedulesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteBackupScheduleRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateIndexRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListIndexesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListIndexesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetIndexRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteIndexRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateFieldRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetFieldRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListFieldsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListFieldsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExportDocumentsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImportDocumentsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BulkDeleteDocumentsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BulkDeleteDocumentsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetBackupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListBackupsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListBackupsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteBackupRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RestoreDatabaseRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDesc, + NumEnums: 0, + NumMessages: 33, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_mockgcp_firestore_admin_v1_firestore_admin_proto_goTypes, + DependencyIndexes: file_mockgcp_firestore_admin_v1_firestore_admin_proto_depIdxs, + MessageInfos: file_mockgcp_firestore_admin_v1_firestore_admin_proto_msgTypes, + }.Build() + File_mockgcp_firestore_admin_v1_firestore_admin_proto = out.File + file_mockgcp_firestore_admin_v1_firestore_admin_proto_rawDesc = nil + file_mockgcp_firestore_admin_v1_firestore_admin_proto_goTypes = nil + file_mockgcp_firestore_admin_v1_firestore_admin_proto_depIdxs = nil +} diff --git a/mockgcp/generated/mockgcp/firestore/admin/v1/firestore_admin.pb.gw.go b/mockgcp/generated/mockgcp/firestore/admin/v1/firestore_admin.pb.gw.go new file mode 100644 index 0000000000..61ec25ea08 --- /dev/null +++ b/mockgcp/generated/mockgcp/firestore/admin/v1/firestore_admin.pb.gw.go @@ -0,0 +1,2904 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: mockgcp/firestore/admin/v1/firestore_admin.proto + +/* +Package adminpb is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package adminpb + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_FirestoreAdmin_CreateIndex_0(ctx context.Context, marshaler runtime.Marshaler, client FirestoreAdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateIndexRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Index); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + msg, err := client.CreateIndex(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_FirestoreAdmin_CreateIndex_0(ctx context.Context, marshaler runtime.Marshaler, server FirestoreAdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateIndexRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Index); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + msg, err := server.CreateIndex(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_FirestoreAdmin_ListIndexes_0 = &utilities.DoubleArray{Encoding: map[string]int{"parent": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_FirestoreAdmin_ListIndexes_0(ctx context.Context, marshaler runtime.Marshaler, client FirestoreAdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListIndexesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_FirestoreAdmin_ListIndexes_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListIndexes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_FirestoreAdmin_ListIndexes_0(ctx context.Context, marshaler runtime.Marshaler, server FirestoreAdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListIndexesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_FirestoreAdmin_ListIndexes_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListIndexes(ctx, &protoReq) + return msg, metadata, err + +} + +func request_FirestoreAdmin_GetIndex_0(ctx context.Context, marshaler runtime.Marshaler, client FirestoreAdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetIndexRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetIndex(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_FirestoreAdmin_GetIndex_0(ctx context.Context, marshaler runtime.Marshaler, server FirestoreAdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetIndexRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetIndex(ctx, &protoReq) + return msg, metadata, err + +} + +func request_FirestoreAdmin_DeleteIndex_0(ctx context.Context, marshaler runtime.Marshaler, client FirestoreAdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteIndexRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.DeleteIndex(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_FirestoreAdmin_DeleteIndex_0(ctx context.Context, marshaler runtime.Marshaler, server FirestoreAdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteIndexRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.DeleteIndex(ctx, &protoReq) + return msg, metadata, err + +} + +func request_FirestoreAdmin_GetField_0(ctx context.Context, marshaler runtime.Marshaler, client FirestoreAdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetFieldRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetField(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_FirestoreAdmin_GetField_0(ctx context.Context, marshaler runtime.Marshaler, server FirestoreAdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetFieldRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetField(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_FirestoreAdmin_UpdateField_0 = &utilities.DoubleArray{Encoding: map[string]int{"field": 0, "name": 1}, Base: []int{1, 2, 1, 0, 0}, Check: []int{0, 1, 2, 3, 2}} +) + +func request_FirestoreAdmin_UpdateField_0(ctx context.Context, marshaler runtime.Marshaler, client FirestoreAdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateFieldRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Field); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 { + if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.Field); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } else { + protoReq.UpdateMask = fieldMask + } + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["field.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "field.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "field.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "field.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_FirestoreAdmin_UpdateField_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UpdateField(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_FirestoreAdmin_UpdateField_0(ctx context.Context, marshaler runtime.Marshaler, server FirestoreAdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateFieldRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Field); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 { + if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.Field); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } else { + protoReq.UpdateMask = fieldMask + } + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["field.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "field.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "field.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "field.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_FirestoreAdmin_UpdateField_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.UpdateField(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_FirestoreAdmin_ListFields_0 = &utilities.DoubleArray{Encoding: map[string]int{"parent": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_FirestoreAdmin_ListFields_0(ctx context.Context, marshaler runtime.Marshaler, client FirestoreAdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListFieldsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_FirestoreAdmin_ListFields_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListFields(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_FirestoreAdmin_ListFields_0(ctx context.Context, marshaler runtime.Marshaler, server FirestoreAdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListFieldsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_FirestoreAdmin_ListFields_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListFields(ctx, &protoReq) + return msg, metadata, err + +} + +func request_FirestoreAdmin_ExportDocuments_0(ctx context.Context, marshaler runtime.Marshaler, client FirestoreAdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ExportDocumentsRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.ExportDocuments(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_FirestoreAdmin_ExportDocuments_0(ctx context.Context, marshaler runtime.Marshaler, server FirestoreAdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ExportDocumentsRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.ExportDocuments(ctx, &protoReq) + return msg, metadata, err + +} + +func request_FirestoreAdmin_ImportDocuments_0(ctx context.Context, marshaler runtime.Marshaler, client FirestoreAdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ImportDocumentsRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.ImportDocuments(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_FirestoreAdmin_ImportDocuments_0(ctx context.Context, marshaler runtime.Marshaler, server FirestoreAdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ImportDocumentsRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.ImportDocuments(ctx, &protoReq) + return msg, metadata, err + +} + +func request_FirestoreAdmin_BulkDeleteDocuments_0(ctx context.Context, marshaler runtime.Marshaler, client FirestoreAdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq BulkDeleteDocumentsRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.BulkDeleteDocuments(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_FirestoreAdmin_BulkDeleteDocuments_0(ctx context.Context, marshaler runtime.Marshaler, server FirestoreAdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq BulkDeleteDocumentsRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.BulkDeleteDocuments(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_FirestoreAdmin_CreateDatabase_0 = &utilities.DoubleArray{Encoding: map[string]int{"database": 0, "parent": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} +) + +func request_FirestoreAdmin_CreateDatabase_0(ctx context.Context, marshaler runtime.Marshaler, client FirestoreAdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateDatabaseRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Database); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_FirestoreAdmin_CreateDatabase_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CreateDatabase(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_FirestoreAdmin_CreateDatabase_0(ctx context.Context, marshaler runtime.Marshaler, server FirestoreAdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateDatabaseRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Database); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_FirestoreAdmin_CreateDatabase_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CreateDatabase(ctx, &protoReq) + return msg, metadata, err + +} + +func request_FirestoreAdmin_GetDatabase_0(ctx context.Context, marshaler runtime.Marshaler, client FirestoreAdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetDatabaseRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetDatabase(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_FirestoreAdmin_GetDatabase_0(ctx context.Context, marshaler runtime.Marshaler, server FirestoreAdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetDatabaseRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetDatabase(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_FirestoreAdmin_ListDatabases_0 = &utilities.DoubleArray{Encoding: map[string]int{"parent": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_FirestoreAdmin_ListDatabases_0(ctx context.Context, marshaler runtime.Marshaler, client FirestoreAdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListDatabasesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_FirestoreAdmin_ListDatabases_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ListDatabases(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_FirestoreAdmin_ListDatabases_0(ctx context.Context, marshaler runtime.Marshaler, server FirestoreAdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListDatabasesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_FirestoreAdmin_ListDatabases_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ListDatabases(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_FirestoreAdmin_UpdateDatabase_0 = &utilities.DoubleArray{Encoding: map[string]int{"database": 0, "name": 1}, Base: []int{1, 2, 1, 0, 0}, Check: []int{0, 1, 2, 3, 2}} +) + +func request_FirestoreAdmin_UpdateDatabase_0(ctx context.Context, marshaler runtime.Marshaler, client FirestoreAdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateDatabaseRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Database); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 { + if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.Database); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } else { + protoReq.UpdateMask = fieldMask + } + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["database.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "database.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "database.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "database.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_FirestoreAdmin_UpdateDatabase_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UpdateDatabase(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_FirestoreAdmin_UpdateDatabase_0(ctx context.Context, marshaler runtime.Marshaler, server FirestoreAdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateDatabaseRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Database); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 { + if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.Database); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } else { + protoReq.UpdateMask = fieldMask + } + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["database.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "database.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "database.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "database.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_FirestoreAdmin_UpdateDatabase_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.UpdateDatabase(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_FirestoreAdmin_DeleteDatabase_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_FirestoreAdmin_DeleteDatabase_0(ctx context.Context, marshaler runtime.Marshaler, client FirestoreAdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteDatabaseRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_FirestoreAdmin_DeleteDatabase_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.DeleteDatabase(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_FirestoreAdmin_DeleteDatabase_0(ctx context.Context, marshaler runtime.Marshaler, server FirestoreAdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteDatabaseRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_FirestoreAdmin_DeleteDatabase_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.DeleteDatabase(ctx, &protoReq) + return msg, metadata, err + +} + +func request_FirestoreAdmin_GetBackup_0(ctx context.Context, marshaler runtime.Marshaler, client FirestoreAdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetBackupRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetBackup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_FirestoreAdmin_GetBackup_0(ctx context.Context, marshaler runtime.Marshaler, server FirestoreAdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetBackupRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetBackup(ctx, &protoReq) + return msg, metadata, err + +} + +func request_FirestoreAdmin_ListBackups_0(ctx context.Context, marshaler runtime.Marshaler, client FirestoreAdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListBackupsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + msg, err := client.ListBackups(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_FirestoreAdmin_ListBackups_0(ctx context.Context, marshaler runtime.Marshaler, server FirestoreAdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListBackupsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + msg, err := server.ListBackups(ctx, &protoReq) + return msg, metadata, err + +} + +func request_FirestoreAdmin_DeleteBackup_0(ctx context.Context, marshaler runtime.Marshaler, client FirestoreAdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteBackupRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.DeleteBackup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_FirestoreAdmin_DeleteBackup_0(ctx context.Context, marshaler runtime.Marshaler, server FirestoreAdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteBackupRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.DeleteBackup(ctx, &protoReq) + return msg, metadata, err + +} + +func request_FirestoreAdmin_RestoreDatabase_0(ctx context.Context, marshaler runtime.Marshaler, client FirestoreAdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RestoreDatabaseRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + msg, err := client.RestoreDatabase(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_FirestoreAdmin_RestoreDatabase_0(ctx context.Context, marshaler runtime.Marshaler, server FirestoreAdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RestoreDatabaseRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + msg, err := server.RestoreDatabase(ctx, &protoReq) + return msg, metadata, err + +} + +func request_FirestoreAdmin_CreateBackupSchedule_0(ctx context.Context, marshaler runtime.Marshaler, client FirestoreAdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateBackupScheduleRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.BackupSchedule); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + msg, err := client.CreateBackupSchedule(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_FirestoreAdmin_CreateBackupSchedule_0(ctx context.Context, marshaler runtime.Marshaler, server FirestoreAdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateBackupScheduleRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.BackupSchedule); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + msg, err := server.CreateBackupSchedule(ctx, &protoReq) + return msg, metadata, err + +} + +func request_FirestoreAdmin_GetBackupSchedule_0(ctx context.Context, marshaler runtime.Marshaler, client FirestoreAdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetBackupScheduleRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.GetBackupSchedule(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_FirestoreAdmin_GetBackupSchedule_0(ctx context.Context, marshaler runtime.Marshaler, server FirestoreAdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetBackupScheduleRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.GetBackupSchedule(ctx, &protoReq) + return msg, metadata, err + +} + +func request_FirestoreAdmin_ListBackupSchedules_0(ctx context.Context, marshaler runtime.Marshaler, client FirestoreAdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListBackupSchedulesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + msg, err := client.ListBackupSchedules(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_FirestoreAdmin_ListBackupSchedules_0(ctx context.Context, marshaler runtime.Marshaler, server FirestoreAdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListBackupSchedulesRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["parent"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent") + } + + protoReq.Parent, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err) + } + + msg, err := server.ListBackupSchedules(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_FirestoreAdmin_UpdateBackupSchedule_0 = &utilities.DoubleArray{Encoding: map[string]int{"backup_schedule": 0, "name": 1}, Base: []int{1, 2, 1, 0, 0}, Check: []int{0, 1, 2, 3, 2}} +) + +func request_FirestoreAdmin_UpdateBackupSchedule_0(ctx context.Context, marshaler runtime.Marshaler, client FirestoreAdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateBackupScheduleRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.BackupSchedule); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 { + if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.BackupSchedule); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } else { + protoReq.UpdateMask = fieldMask + } + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["backup_schedule.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "backup_schedule.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "backup_schedule.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "backup_schedule.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_FirestoreAdmin_UpdateBackupSchedule_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UpdateBackupSchedule(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_FirestoreAdmin_UpdateBackupSchedule_0(ctx context.Context, marshaler runtime.Marshaler, server FirestoreAdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateBackupScheduleRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.BackupSchedule); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if protoReq.UpdateMask == nil || len(protoReq.UpdateMask.GetPaths()) == 0 { + if fieldMask, err := runtime.FieldMaskFromRequestBody(newReader(), protoReq.BackupSchedule); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } else { + protoReq.UpdateMask = fieldMask + } + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["backup_schedule.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "backup_schedule.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "backup_schedule.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "backup_schedule.name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_FirestoreAdmin_UpdateBackupSchedule_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.UpdateBackupSchedule(ctx, &protoReq) + return msg, metadata, err + +} + +func request_FirestoreAdmin_DeleteBackupSchedule_0(ctx context.Context, marshaler runtime.Marshaler, client FirestoreAdminClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteBackupScheduleRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := client.DeleteBackupSchedule(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_FirestoreAdmin_DeleteBackupSchedule_0(ctx context.Context, marshaler runtime.Marshaler, server FirestoreAdminServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteBackupScheduleRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") + } + + protoReq.Name, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) + } + + msg, err := server.DeleteBackupSchedule(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterFirestoreAdminHandlerServer registers the http handlers for service FirestoreAdmin to "mux". +// UnaryRPC :call FirestoreAdminServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterFirestoreAdminHandlerFromEndpoint instead. +func RegisterFirestoreAdminHandlerServer(ctx context.Context, mux *runtime.ServeMux, server FirestoreAdminServer) error { + + mux.Handle("POST", pattern_FirestoreAdmin_CreateIndex_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/CreateIndex", runtime.WithHTTPPathPattern("/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_FirestoreAdmin_CreateIndex_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_CreateIndex_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_FirestoreAdmin_ListIndexes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/ListIndexes", runtime.WithHTTPPathPattern("/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_FirestoreAdmin_ListIndexes_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_ListIndexes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_FirestoreAdmin_GetIndex_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/GetIndex", runtime.WithHTTPPathPattern("/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_FirestoreAdmin_GetIndex_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_GetIndex_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_FirestoreAdmin_DeleteIndex_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/DeleteIndex", runtime.WithHTTPPathPattern("/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_FirestoreAdmin_DeleteIndex_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_DeleteIndex_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_FirestoreAdmin_GetField_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/GetField", runtime.WithHTTPPathPattern("/v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_FirestoreAdmin_GetField_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_GetField_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PATCH", pattern_FirestoreAdmin_UpdateField_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/UpdateField", runtime.WithHTTPPathPattern("/v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_FirestoreAdmin_UpdateField_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_UpdateField_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_FirestoreAdmin_ListFields_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/ListFields", runtime.WithHTTPPathPattern("/v1/{parent=projects/*/databases/*/collectionGroups/*}/fields")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_FirestoreAdmin_ListFields_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_ListFields_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_FirestoreAdmin_ExportDocuments_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/ExportDocuments", runtime.WithHTTPPathPattern("/v1/{name=projects/*/databases/*}:exportDocuments")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_FirestoreAdmin_ExportDocuments_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_ExportDocuments_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_FirestoreAdmin_ImportDocuments_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/ImportDocuments", runtime.WithHTTPPathPattern("/v1/{name=projects/*/databases/*}:importDocuments")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_FirestoreAdmin_ImportDocuments_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_ImportDocuments_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_FirestoreAdmin_BulkDeleteDocuments_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/BulkDeleteDocuments", runtime.WithHTTPPathPattern("/v1/{name=projects/*/databases/*}:bulkDeleteDocuments")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_FirestoreAdmin_BulkDeleteDocuments_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_BulkDeleteDocuments_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_FirestoreAdmin_CreateDatabase_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/CreateDatabase", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/databases")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_FirestoreAdmin_CreateDatabase_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_CreateDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_FirestoreAdmin_GetDatabase_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/GetDatabase", runtime.WithHTTPPathPattern("/v1/{name=projects/*/databases/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_FirestoreAdmin_GetDatabase_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_GetDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_FirestoreAdmin_ListDatabases_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/ListDatabases", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/databases")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_FirestoreAdmin_ListDatabases_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_ListDatabases_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PATCH", pattern_FirestoreAdmin_UpdateDatabase_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/UpdateDatabase", runtime.WithHTTPPathPattern("/v1/{database.name=projects/*/databases/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_FirestoreAdmin_UpdateDatabase_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_UpdateDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_FirestoreAdmin_DeleteDatabase_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/DeleteDatabase", runtime.WithHTTPPathPattern("/v1/{name=projects/*/databases/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_FirestoreAdmin_DeleteDatabase_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_DeleteDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_FirestoreAdmin_GetBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/GetBackup", runtime.WithHTTPPathPattern("/v1/{name=projects/*/locations/*/backups/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_FirestoreAdmin_GetBackup_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_GetBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_FirestoreAdmin_ListBackups_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/ListBackups", runtime.WithHTTPPathPattern("/v1/{parent=projects/*/locations/*}/backups")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_FirestoreAdmin_ListBackups_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_ListBackups_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_FirestoreAdmin_DeleteBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/DeleteBackup", runtime.WithHTTPPathPattern("/v1/{name=projects/*/locations/*/backups/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_FirestoreAdmin_DeleteBackup_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_DeleteBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_FirestoreAdmin_RestoreDatabase_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/RestoreDatabase", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/databases:restore")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_FirestoreAdmin_RestoreDatabase_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_RestoreDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_FirestoreAdmin_CreateBackupSchedule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/CreateBackupSchedule", runtime.WithHTTPPathPattern("/v1/{parent=projects/*/databases/*}/backupSchedules")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_FirestoreAdmin_CreateBackupSchedule_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_CreateBackupSchedule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_FirestoreAdmin_GetBackupSchedule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/GetBackupSchedule", runtime.WithHTTPPathPattern("/v1/{name=projects/*/databases/*/backupSchedules/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_FirestoreAdmin_GetBackupSchedule_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_GetBackupSchedule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_FirestoreAdmin_ListBackupSchedules_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/ListBackupSchedules", runtime.WithHTTPPathPattern("/v1/{parent=projects/*/databases/*}/backupSchedules")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_FirestoreAdmin_ListBackupSchedules_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_ListBackupSchedules_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PATCH", pattern_FirestoreAdmin_UpdateBackupSchedule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/UpdateBackupSchedule", runtime.WithHTTPPathPattern("/v1/{backup_schedule.name=projects/*/databases/*/backupSchedules/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_FirestoreAdmin_UpdateBackupSchedule_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_UpdateBackupSchedule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_FirestoreAdmin_DeleteBackupSchedule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/DeleteBackupSchedule", runtime.WithHTTPPathPattern("/v1/{name=projects/*/databases/*/backupSchedules/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_FirestoreAdmin_DeleteBackupSchedule_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_DeleteBackupSchedule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterFirestoreAdminHandlerFromEndpoint is same as RegisterFirestoreAdminHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterFirestoreAdminHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterFirestoreAdminHandler(ctx, mux, conn) +} + +// RegisterFirestoreAdminHandler registers the http handlers for service FirestoreAdmin to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterFirestoreAdminHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterFirestoreAdminHandlerClient(ctx, mux, NewFirestoreAdminClient(conn)) +} + +// RegisterFirestoreAdminHandlerClient registers the http handlers for service FirestoreAdmin +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "FirestoreAdminClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "FirestoreAdminClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "FirestoreAdminClient" to call the correct interceptors. +func RegisterFirestoreAdminHandlerClient(ctx context.Context, mux *runtime.ServeMux, client FirestoreAdminClient) error { + + mux.Handle("POST", pattern_FirestoreAdmin_CreateIndex_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/CreateIndex", runtime.WithHTTPPathPattern("/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_FirestoreAdmin_CreateIndex_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_CreateIndex_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_FirestoreAdmin_ListIndexes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/ListIndexes", runtime.WithHTTPPathPattern("/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_FirestoreAdmin_ListIndexes_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_ListIndexes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_FirestoreAdmin_GetIndex_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/GetIndex", runtime.WithHTTPPathPattern("/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_FirestoreAdmin_GetIndex_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_GetIndex_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_FirestoreAdmin_DeleteIndex_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/DeleteIndex", runtime.WithHTTPPathPattern("/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_FirestoreAdmin_DeleteIndex_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_DeleteIndex_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_FirestoreAdmin_GetField_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/GetField", runtime.WithHTTPPathPattern("/v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_FirestoreAdmin_GetField_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_GetField_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PATCH", pattern_FirestoreAdmin_UpdateField_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/UpdateField", runtime.WithHTTPPathPattern("/v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_FirestoreAdmin_UpdateField_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_UpdateField_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_FirestoreAdmin_ListFields_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/ListFields", runtime.WithHTTPPathPattern("/v1/{parent=projects/*/databases/*/collectionGroups/*}/fields")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_FirestoreAdmin_ListFields_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_ListFields_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_FirestoreAdmin_ExportDocuments_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/ExportDocuments", runtime.WithHTTPPathPattern("/v1/{name=projects/*/databases/*}:exportDocuments")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_FirestoreAdmin_ExportDocuments_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_ExportDocuments_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_FirestoreAdmin_ImportDocuments_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/ImportDocuments", runtime.WithHTTPPathPattern("/v1/{name=projects/*/databases/*}:importDocuments")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_FirestoreAdmin_ImportDocuments_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_ImportDocuments_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_FirestoreAdmin_BulkDeleteDocuments_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/BulkDeleteDocuments", runtime.WithHTTPPathPattern("/v1/{name=projects/*/databases/*}:bulkDeleteDocuments")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_FirestoreAdmin_BulkDeleteDocuments_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_BulkDeleteDocuments_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_FirestoreAdmin_CreateDatabase_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/CreateDatabase", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/databases")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_FirestoreAdmin_CreateDatabase_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_CreateDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_FirestoreAdmin_GetDatabase_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/GetDatabase", runtime.WithHTTPPathPattern("/v1/{name=projects/*/databases/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_FirestoreAdmin_GetDatabase_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_GetDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_FirestoreAdmin_ListDatabases_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/ListDatabases", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/databases")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_FirestoreAdmin_ListDatabases_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_ListDatabases_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PATCH", pattern_FirestoreAdmin_UpdateDatabase_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/UpdateDatabase", runtime.WithHTTPPathPattern("/v1/{database.name=projects/*/databases/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_FirestoreAdmin_UpdateDatabase_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_UpdateDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_FirestoreAdmin_DeleteDatabase_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/DeleteDatabase", runtime.WithHTTPPathPattern("/v1/{name=projects/*/databases/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_FirestoreAdmin_DeleteDatabase_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_DeleteDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_FirestoreAdmin_GetBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/GetBackup", runtime.WithHTTPPathPattern("/v1/{name=projects/*/locations/*/backups/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_FirestoreAdmin_GetBackup_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_GetBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_FirestoreAdmin_ListBackups_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/ListBackups", runtime.WithHTTPPathPattern("/v1/{parent=projects/*/locations/*}/backups")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_FirestoreAdmin_ListBackups_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_ListBackups_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_FirestoreAdmin_DeleteBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/DeleteBackup", runtime.WithHTTPPathPattern("/v1/{name=projects/*/locations/*/backups/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_FirestoreAdmin_DeleteBackup_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_DeleteBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_FirestoreAdmin_RestoreDatabase_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/RestoreDatabase", runtime.WithHTTPPathPattern("/v1/{parent=projects/*}/databases:restore")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_FirestoreAdmin_RestoreDatabase_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_RestoreDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_FirestoreAdmin_CreateBackupSchedule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/CreateBackupSchedule", runtime.WithHTTPPathPattern("/v1/{parent=projects/*/databases/*}/backupSchedules")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_FirestoreAdmin_CreateBackupSchedule_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_CreateBackupSchedule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_FirestoreAdmin_GetBackupSchedule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/GetBackupSchedule", runtime.WithHTTPPathPattern("/v1/{name=projects/*/databases/*/backupSchedules/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_FirestoreAdmin_GetBackupSchedule_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_GetBackupSchedule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_FirestoreAdmin_ListBackupSchedules_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/ListBackupSchedules", runtime.WithHTTPPathPattern("/v1/{parent=projects/*/databases/*}/backupSchedules")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_FirestoreAdmin_ListBackupSchedules_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_ListBackupSchedules_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PATCH", pattern_FirestoreAdmin_UpdateBackupSchedule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/UpdateBackupSchedule", runtime.WithHTTPPathPattern("/v1/{backup_schedule.name=projects/*/databases/*/backupSchedules/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_FirestoreAdmin_UpdateBackupSchedule_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_UpdateBackupSchedule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_FirestoreAdmin_DeleteBackupSchedule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mockgcp.firestore.admin.v1.FirestoreAdmin/DeleteBackupSchedule", runtime.WithHTTPPathPattern("/v1/{name=projects/*/databases/*/backupSchedules/*}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_FirestoreAdmin_DeleteBackupSchedule_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_FirestoreAdmin_DeleteBackupSchedule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_FirestoreAdmin_CreateIndex_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 4, 6, 5, 4, 2, 5}, []string{"v1", "projects", "databases", "collectionGroups", "parent", "indexes"}, "")) + + pattern_FirestoreAdmin_ListIndexes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 4, 6, 5, 4, 2, 5}, []string{"v1", "projects", "databases", "collectionGroups", "parent", "indexes"}, "")) + + pattern_FirestoreAdmin_GetIndex_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 2, 4, 1, 0, 4, 8, 5, 5}, []string{"v1", "projects", "databases", "collectionGroups", "indexes", "name"}, "")) + + pattern_FirestoreAdmin_DeleteIndex_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 2, 4, 1, 0, 4, 8, 5, 5}, []string{"v1", "projects", "databases", "collectionGroups", "indexes", "name"}, "")) + + pattern_FirestoreAdmin_GetField_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 2, 4, 1, 0, 4, 8, 5, 5}, []string{"v1", "projects", "databases", "collectionGroups", "fields", "name"}, "")) + + pattern_FirestoreAdmin_UpdateField_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 2, 4, 1, 0, 4, 8, 5, 5}, []string{"v1", "projects", "databases", "collectionGroups", "fields", "field.name"}, "")) + + pattern_FirestoreAdmin_ListFields_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 4, 6, 5, 4, 2, 5}, []string{"v1", "projects", "databases", "collectionGroups", "parent", "fields"}, "")) + + pattern_FirestoreAdmin_ExportDocuments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "databases", "name"}, "exportDocuments")) + + pattern_FirestoreAdmin_ImportDocuments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "databases", "name"}, "importDocuments")) + + pattern_FirestoreAdmin_BulkDeleteDocuments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "databases", "name"}, "bulkDeleteDocuments")) + + pattern_FirestoreAdmin_CreateDatabase_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "projects", "parent", "databases"}, "")) + + pattern_FirestoreAdmin_GetDatabase_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "databases", "name"}, "")) + + pattern_FirestoreAdmin_ListDatabases_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "projects", "parent", "databases"}, "")) + + pattern_FirestoreAdmin_UpdateDatabase_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "databases", "database.name"}, "")) + + pattern_FirestoreAdmin_DeleteDatabase_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "databases", "name"}, "")) + + pattern_FirestoreAdmin_GetBackup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 4, 6, 5, 4}, []string{"v1", "projects", "locations", "backups", "name"}, "")) + + pattern_FirestoreAdmin_ListBackups_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3, 2, 4}, []string{"v1", "projects", "locations", "parent", "backups"}, "")) + + pattern_FirestoreAdmin_DeleteBackup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 4, 6, 5, 4}, []string{"v1", "projects", "locations", "backups", "name"}, "")) + + pattern_FirestoreAdmin_RestoreDatabase_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3}, []string{"v1", "projects", "parent", "databases"}, "restore")) + + pattern_FirestoreAdmin_CreateBackupSchedule_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3, 2, 4}, []string{"v1", "projects", "databases", "parent", "backupSchedules"}, "")) + + pattern_FirestoreAdmin_GetBackupSchedule_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 4, 6, 5, 4}, []string{"v1", "projects", "databases", "backupSchedules", "name"}, "")) + + pattern_FirestoreAdmin_ListBackupSchedules_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3, 2, 4}, []string{"v1", "projects", "databases", "parent", "backupSchedules"}, "")) + + pattern_FirestoreAdmin_UpdateBackupSchedule_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 4, 6, 5, 4}, []string{"v1", "projects", "databases", "backupSchedules", "backup_schedule.name"}, "")) + + pattern_FirestoreAdmin_DeleteBackupSchedule_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 4, 6, 5, 4}, []string{"v1", "projects", "databases", "backupSchedules", "name"}, "")) +) + +var ( + forward_FirestoreAdmin_CreateIndex_0 = runtime.ForwardResponseMessage + + forward_FirestoreAdmin_ListIndexes_0 = runtime.ForwardResponseMessage + + forward_FirestoreAdmin_GetIndex_0 = runtime.ForwardResponseMessage + + forward_FirestoreAdmin_DeleteIndex_0 = runtime.ForwardResponseMessage + + forward_FirestoreAdmin_GetField_0 = runtime.ForwardResponseMessage + + forward_FirestoreAdmin_UpdateField_0 = runtime.ForwardResponseMessage + + forward_FirestoreAdmin_ListFields_0 = runtime.ForwardResponseMessage + + forward_FirestoreAdmin_ExportDocuments_0 = runtime.ForwardResponseMessage + + forward_FirestoreAdmin_ImportDocuments_0 = runtime.ForwardResponseMessage + + forward_FirestoreAdmin_BulkDeleteDocuments_0 = runtime.ForwardResponseMessage + + forward_FirestoreAdmin_CreateDatabase_0 = runtime.ForwardResponseMessage + + forward_FirestoreAdmin_GetDatabase_0 = runtime.ForwardResponseMessage + + forward_FirestoreAdmin_ListDatabases_0 = runtime.ForwardResponseMessage + + forward_FirestoreAdmin_UpdateDatabase_0 = runtime.ForwardResponseMessage + + forward_FirestoreAdmin_DeleteDatabase_0 = runtime.ForwardResponseMessage + + forward_FirestoreAdmin_GetBackup_0 = runtime.ForwardResponseMessage + + forward_FirestoreAdmin_ListBackups_0 = runtime.ForwardResponseMessage + + forward_FirestoreAdmin_DeleteBackup_0 = runtime.ForwardResponseMessage + + forward_FirestoreAdmin_RestoreDatabase_0 = runtime.ForwardResponseMessage + + forward_FirestoreAdmin_CreateBackupSchedule_0 = runtime.ForwardResponseMessage + + forward_FirestoreAdmin_GetBackupSchedule_0 = runtime.ForwardResponseMessage + + forward_FirestoreAdmin_ListBackupSchedules_0 = runtime.ForwardResponseMessage + + forward_FirestoreAdmin_UpdateBackupSchedule_0 = runtime.ForwardResponseMessage + + forward_FirestoreAdmin_DeleteBackupSchedule_0 = runtime.ForwardResponseMessage +) diff --git a/mockgcp/generated/mockgcp/firestore/admin/v1/firestore_admin_grpc.pb.go b/mockgcp/generated/mockgcp/firestore/admin/v1/firestore_admin_grpc.pb.go new file mode 100644 index 0000000000..2cd8eb9be7 --- /dev/null +++ b/mockgcp/generated/mockgcp/firestore/admin/v1/firestore_admin_grpc.pb.go @@ -0,0 +1,1115 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.12.4 +// source: mockgcp/firestore/admin/v1/firestore_admin.proto + +package adminpb + +import ( + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + context "context" + empty "github.com/golang/protobuf/ptypes/empty" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// FirestoreAdminClient is the client API for FirestoreAdmin service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type FirestoreAdminClient interface { + // Creates a composite index. This returns a + // [google.longrunning.Operation][google.longrunning.Operation] which may be + // used to track the status of the creation. The metadata for the operation + // will be the type + // [IndexOperationMetadata][mockgcp.firestore.admin.v1.IndexOperationMetadata]. + CreateIndex(ctx context.Context, in *CreateIndexRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // Lists composite indexes. + ListIndexes(ctx context.Context, in *ListIndexesRequest, opts ...grpc.CallOption) (*ListIndexesResponse, error) + // Gets a composite index. + GetIndex(ctx context.Context, in *GetIndexRequest, opts ...grpc.CallOption) (*Index, error) + // Deletes a composite index. + DeleteIndex(ctx context.Context, in *DeleteIndexRequest, opts ...grpc.CallOption) (*empty.Empty, error) + // Gets the metadata and configuration for a Field. + GetField(ctx context.Context, in *GetFieldRequest, opts ...grpc.CallOption) (*Field, error) + // Updates a field configuration. Currently, field updates apply only to + // single field index configuration. However, calls to + // [FirestoreAdmin.UpdateField][mockgcp.firestore.admin.v1.FirestoreAdmin.UpdateField] + // should provide a field mask to avoid changing any configuration that the + // caller isn't aware of. The field mask should be specified as: `{ paths: + // "index_config" }`. + // + // This call returns a + // [google.longrunning.Operation][google.longrunning.Operation] which may be + // used to track the status of the field update. The metadata for the + // operation will be the type + // [FieldOperationMetadata][mockgcp.firestore.admin.v1.FieldOperationMetadata]. + // + // To configure the default field settings for the database, use + // the special `Field` with resource name: + // `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. + UpdateField(ctx context.Context, in *UpdateFieldRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // Lists the field configuration and metadata for this database. + // + // Currently, + // [FirestoreAdmin.ListFields][mockgcp.firestore.admin.v1.FirestoreAdmin.ListFields] + // only supports listing fields that have been explicitly overridden. To issue + // this query, call + // [FirestoreAdmin.ListFields][mockgcp.firestore.admin.v1.FirestoreAdmin.ListFields] + // with the filter set to `indexConfig.usesAncestorConfig:false` or + // `ttlConfig:*`. + ListFields(ctx context.Context, in *ListFieldsRequest, opts ...grpc.CallOption) (*ListFieldsResponse, error) + // Exports a copy of all or a subset of documents from Google Cloud Firestore + // to another storage system, such as Google Cloud Storage. Recent updates to + // documents may not be reflected in the export. The export occurs in the + // background and its progress can be monitored and managed via the + // Operation resource that is created. The output of an export may only be + // used once the associated operation is done. If an export operation is + // cancelled before completion it may leave partial data behind in Google + // Cloud Storage. + // + // For more details on export behavior and output format, refer to: + // https://cloud.google.com/firestore/docs/manage-data/export-import + ExportDocuments(ctx context.Context, in *ExportDocumentsRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // Imports documents into Google Cloud Firestore. Existing documents with the + // same name are overwritten. The import occurs in the background and its + // progress can be monitored and managed via the Operation resource that is + // created. If an ImportDocuments operation is cancelled, it is possible + // that a subset of the data has already been imported to Cloud Firestore. + ImportDocuments(ctx context.Context, in *ImportDocumentsRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // Bulk deletes a subset of documents from Google Cloud Firestore. + // Documents created or updated after the underlying system starts to process + // the request will not be deleted. The bulk delete occurs in the background + // and its progress can be monitored and managed via the Operation resource + // that is created. + // + // For more details on bulk delete behavior, refer to: + // https://cloud.google.com/firestore/docs/manage-data/bulk-delete + BulkDeleteDocuments(ctx context.Context, in *BulkDeleteDocumentsRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // Create a database. + CreateDatabase(ctx context.Context, in *CreateDatabaseRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // Gets information about a database. + GetDatabase(ctx context.Context, in *GetDatabaseRequest, opts ...grpc.CallOption) (*Database, error) + // List all the databases in the project. + ListDatabases(ctx context.Context, in *ListDatabasesRequest, opts ...grpc.CallOption) (*ListDatabasesResponse, error) + // Updates a database. + UpdateDatabase(ctx context.Context, in *UpdateDatabaseRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // Deletes a database. + DeleteDatabase(ctx context.Context, in *DeleteDatabaseRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // Gets information about a backup. + GetBackup(ctx context.Context, in *GetBackupRequest, opts ...grpc.CallOption) (*Backup, error) + // Lists all the backups. + ListBackups(ctx context.Context, in *ListBackupsRequest, opts ...grpc.CallOption) (*ListBackupsResponse, error) + // Deletes a backup. + DeleteBackup(ctx context.Context, in *DeleteBackupRequest, opts ...grpc.CallOption) (*empty.Empty, error) + // Creates a new database by restoring from an existing backup. + // + // The new database must be in the same cloud region or multi-region location + // as the existing backup. This behaves similar to + // [FirestoreAdmin.CreateDatabase][mockgcp.firestore.admin.v1.FirestoreAdmin.CreateDatabase] + // except instead of creating a new empty database, a new database is created + // with the database type, index configuration, and documents from an existing + // backup. + // + // The [long-running operation][google.longrunning.Operation] can be used to + // track the progress of the restore, with the Operation's + // [metadata][google.longrunning.Operation.metadata] field type being the + // [RestoreDatabaseMetadata][mockgcp.firestore.admin.v1.RestoreDatabaseMetadata]. + // The [response][google.longrunning.Operation.response] type is the + // [Database][mockgcp.firestore.admin.v1.Database] if the restore was + // successful. The new database is not readable or writeable until the LRO has + // completed. + RestoreDatabase(ctx context.Context, in *RestoreDatabaseRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // Creates a backup schedule on a database. + // At most two backup schedules can be configured on a database, one daily + // backup schedule and one weekly backup schedule. + CreateBackupSchedule(ctx context.Context, in *CreateBackupScheduleRequest, opts ...grpc.CallOption) (*BackupSchedule, error) + // Gets information about a backup schedule. + GetBackupSchedule(ctx context.Context, in *GetBackupScheduleRequest, opts ...grpc.CallOption) (*BackupSchedule, error) + // List backup schedules. + ListBackupSchedules(ctx context.Context, in *ListBackupSchedulesRequest, opts ...grpc.CallOption) (*ListBackupSchedulesResponse, error) + // Updates a backup schedule. + UpdateBackupSchedule(ctx context.Context, in *UpdateBackupScheduleRequest, opts ...grpc.CallOption) (*BackupSchedule, error) + // Deletes a backup schedule. + DeleteBackupSchedule(ctx context.Context, in *DeleteBackupScheduleRequest, opts ...grpc.CallOption) (*empty.Empty, error) +} + +type firestoreAdminClient struct { + cc grpc.ClientConnInterface +} + +func NewFirestoreAdminClient(cc grpc.ClientConnInterface) FirestoreAdminClient { + return &firestoreAdminClient{cc} +} + +func (c *firestoreAdminClient) CreateIndex(ctx context.Context, in *CreateIndexRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, "/mockgcp.firestore.admin.v1.FirestoreAdmin/CreateIndex", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *firestoreAdminClient) ListIndexes(ctx context.Context, in *ListIndexesRequest, opts ...grpc.CallOption) (*ListIndexesResponse, error) { + out := new(ListIndexesResponse) + err := c.cc.Invoke(ctx, "/mockgcp.firestore.admin.v1.FirestoreAdmin/ListIndexes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *firestoreAdminClient) GetIndex(ctx context.Context, in *GetIndexRequest, opts ...grpc.CallOption) (*Index, error) { + out := new(Index) + err := c.cc.Invoke(ctx, "/mockgcp.firestore.admin.v1.FirestoreAdmin/GetIndex", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *firestoreAdminClient) DeleteIndex(ctx context.Context, in *DeleteIndexRequest, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/mockgcp.firestore.admin.v1.FirestoreAdmin/DeleteIndex", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *firestoreAdminClient) GetField(ctx context.Context, in *GetFieldRequest, opts ...grpc.CallOption) (*Field, error) { + out := new(Field) + err := c.cc.Invoke(ctx, "/mockgcp.firestore.admin.v1.FirestoreAdmin/GetField", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *firestoreAdminClient) UpdateField(ctx context.Context, in *UpdateFieldRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, "/mockgcp.firestore.admin.v1.FirestoreAdmin/UpdateField", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *firestoreAdminClient) ListFields(ctx context.Context, in *ListFieldsRequest, opts ...grpc.CallOption) (*ListFieldsResponse, error) { + out := new(ListFieldsResponse) + err := c.cc.Invoke(ctx, "/mockgcp.firestore.admin.v1.FirestoreAdmin/ListFields", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *firestoreAdminClient) ExportDocuments(ctx context.Context, in *ExportDocumentsRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, "/mockgcp.firestore.admin.v1.FirestoreAdmin/ExportDocuments", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *firestoreAdminClient) ImportDocuments(ctx context.Context, in *ImportDocumentsRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, "/mockgcp.firestore.admin.v1.FirestoreAdmin/ImportDocuments", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *firestoreAdminClient) BulkDeleteDocuments(ctx context.Context, in *BulkDeleteDocumentsRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, "/mockgcp.firestore.admin.v1.FirestoreAdmin/BulkDeleteDocuments", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *firestoreAdminClient) CreateDatabase(ctx context.Context, in *CreateDatabaseRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, "/mockgcp.firestore.admin.v1.FirestoreAdmin/CreateDatabase", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *firestoreAdminClient) GetDatabase(ctx context.Context, in *GetDatabaseRequest, opts ...grpc.CallOption) (*Database, error) { + out := new(Database) + err := c.cc.Invoke(ctx, "/mockgcp.firestore.admin.v1.FirestoreAdmin/GetDatabase", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *firestoreAdminClient) ListDatabases(ctx context.Context, in *ListDatabasesRequest, opts ...grpc.CallOption) (*ListDatabasesResponse, error) { + out := new(ListDatabasesResponse) + err := c.cc.Invoke(ctx, "/mockgcp.firestore.admin.v1.FirestoreAdmin/ListDatabases", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *firestoreAdminClient) UpdateDatabase(ctx context.Context, in *UpdateDatabaseRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, "/mockgcp.firestore.admin.v1.FirestoreAdmin/UpdateDatabase", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *firestoreAdminClient) DeleteDatabase(ctx context.Context, in *DeleteDatabaseRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, "/mockgcp.firestore.admin.v1.FirestoreAdmin/DeleteDatabase", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *firestoreAdminClient) GetBackup(ctx context.Context, in *GetBackupRequest, opts ...grpc.CallOption) (*Backup, error) { + out := new(Backup) + err := c.cc.Invoke(ctx, "/mockgcp.firestore.admin.v1.FirestoreAdmin/GetBackup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *firestoreAdminClient) ListBackups(ctx context.Context, in *ListBackupsRequest, opts ...grpc.CallOption) (*ListBackupsResponse, error) { + out := new(ListBackupsResponse) + err := c.cc.Invoke(ctx, "/mockgcp.firestore.admin.v1.FirestoreAdmin/ListBackups", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *firestoreAdminClient) DeleteBackup(ctx context.Context, in *DeleteBackupRequest, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/mockgcp.firestore.admin.v1.FirestoreAdmin/DeleteBackup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *firestoreAdminClient) RestoreDatabase(ctx context.Context, in *RestoreDatabaseRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, "/mockgcp.firestore.admin.v1.FirestoreAdmin/RestoreDatabase", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *firestoreAdminClient) CreateBackupSchedule(ctx context.Context, in *CreateBackupScheduleRequest, opts ...grpc.CallOption) (*BackupSchedule, error) { + out := new(BackupSchedule) + err := c.cc.Invoke(ctx, "/mockgcp.firestore.admin.v1.FirestoreAdmin/CreateBackupSchedule", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *firestoreAdminClient) GetBackupSchedule(ctx context.Context, in *GetBackupScheduleRequest, opts ...grpc.CallOption) (*BackupSchedule, error) { + out := new(BackupSchedule) + err := c.cc.Invoke(ctx, "/mockgcp.firestore.admin.v1.FirestoreAdmin/GetBackupSchedule", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *firestoreAdminClient) ListBackupSchedules(ctx context.Context, in *ListBackupSchedulesRequest, opts ...grpc.CallOption) (*ListBackupSchedulesResponse, error) { + out := new(ListBackupSchedulesResponse) + err := c.cc.Invoke(ctx, "/mockgcp.firestore.admin.v1.FirestoreAdmin/ListBackupSchedules", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *firestoreAdminClient) UpdateBackupSchedule(ctx context.Context, in *UpdateBackupScheduleRequest, opts ...grpc.CallOption) (*BackupSchedule, error) { + out := new(BackupSchedule) + err := c.cc.Invoke(ctx, "/mockgcp.firestore.admin.v1.FirestoreAdmin/UpdateBackupSchedule", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *firestoreAdminClient) DeleteBackupSchedule(ctx context.Context, in *DeleteBackupScheduleRequest, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/mockgcp.firestore.admin.v1.FirestoreAdmin/DeleteBackupSchedule", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// FirestoreAdminServer is the server API for FirestoreAdmin service. +// All implementations must embed UnimplementedFirestoreAdminServer +// for forward compatibility +type FirestoreAdminServer interface { + // Creates a composite index. This returns a + // [google.longrunning.Operation][google.longrunning.Operation] which may be + // used to track the status of the creation. The metadata for the operation + // will be the type + // [IndexOperationMetadata][mockgcp.firestore.admin.v1.IndexOperationMetadata]. + CreateIndex(context.Context, *CreateIndexRequest) (*longrunningpb.Operation, error) + // Lists composite indexes. + ListIndexes(context.Context, *ListIndexesRequest) (*ListIndexesResponse, error) + // Gets a composite index. + GetIndex(context.Context, *GetIndexRequest) (*Index, error) + // Deletes a composite index. + DeleteIndex(context.Context, *DeleteIndexRequest) (*empty.Empty, error) + // Gets the metadata and configuration for a Field. + GetField(context.Context, *GetFieldRequest) (*Field, error) + // Updates a field configuration. Currently, field updates apply only to + // single field index configuration. However, calls to + // [FirestoreAdmin.UpdateField][mockgcp.firestore.admin.v1.FirestoreAdmin.UpdateField] + // should provide a field mask to avoid changing any configuration that the + // caller isn't aware of. The field mask should be specified as: `{ paths: + // "index_config" }`. + // + // This call returns a + // [google.longrunning.Operation][google.longrunning.Operation] which may be + // used to track the status of the field update. The metadata for the + // operation will be the type + // [FieldOperationMetadata][mockgcp.firestore.admin.v1.FieldOperationMetadata]. + // + // To configure the default field settings for the database, use + // the special `Field` with resource name: + // `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. + UpdateField(context.Context, *UpdateFieldRequest) (*longrunningpb.Operation, error) + // Lists the field configuration and metadata for this database. + // + // Currently, + // [FirestoreAdmin.ListFields][mockgcp.firestore.admin.v1.FirestoreAdmin.ListFields] + // only supports listing fields that have been explicitly overridden. To issue + // this query, call + // [FirestoreAdmin.ListFields][mockgcp.firestore.admin.v1.FirestoreAdmin.ListFields] + // with the filter set to `indexConfig.usesAncestorConfig:false` or + // `ttlConfig:*`. + ListFields(context.Context, *ListFieldsRequest) (*ListFieldsResponse, error) + // Exports a copy of all or a subset of documents from Google Cloud Firestore + // to another storage system, such as Google Cloud Storage. Recent updates to + // documents may not be reflected in the export. The export occurs in the + // background and its progress can be monitored and managed via the + // Operation resource that is created. The output of an export may only be + // used once the associated operation is done. If an export operation is + // cancelled before completion it may leave partial data behind in Google + // Cloud Storage. + // + // For more details on export behavior and output format, refer to: + // https://cloud.google.com/firestore/docs/manage-data/export-import + ExportDocuments(context.Context, *ExportDocumentsRequest) (*longrunningpb.Operation, error) + // Imports documents into Google Cloud Firestore. Existing documents with the + // same name are overwritten. The import occurs in the background and its + // progress can be monitored and managed via the Operation resource that is + // created. If an ImportDocuments operation is cancelled, it is possible + // that a subset of the data has already been imported to Cloud Firestore. + ImportDocuments(context.Context, *ImportDocumentsRequest) (*longrunningpb.Operation, error) + // Bulk deletes a subset of documents from Google Cloud Firestore. + // Documents created or updated after the underlying system starts to process + // the request will not be deleted. The bulk delete occurs in the background + // and its progress can be monitored and managed via the Operation resource + // that is created. + // + // For more details on bulk delete behavior, refer to: + // https://cloud.google.com/firestore/docs/manage-data/bulk-delete + BulkDeleteDocuments(context.Context, *BulkDeleteDocumentsRequest) (*longrunningpb.Operation, error) + // Create a database. + CreateDatabase(context.Context, *CreateDatabaseRequest) (*longrunningpb.Operation, error) + // Gets information about a database. + GetDatabase(context.Context, *GetDatabaseRequest) (*Database, error) + // List all the databases in the project. + ListDatabases(context.Context, *ListDatabasesRequest) (*ListDatabasesResponse, error) + // Updates a database. + UpdateDatabase(context.Context, *UpdateDatabaseRequest) (*longrunningpb.Operation, error) + // Deletes a database. + DeleteDatabase(context.Context, *DeleteDatabaseRequest) (*longrunningpb.Operation, error) + // Gets information about a backup. + GetBackup(context.Context, *GetBackupRequest) (*Backup, error) + // Lists all the backups. + ListBackups(context.Context, *ListBackupsRequest) (*ListBackupsResponse, error) + // Deletes a backup. + DeleteBackup(context.Context, *DeleteBackupRequest) (*empty.Empty, error) + // Creates a new database by restoring from an existing backup. + // + // The new database must be in the same cloud region or multi-region location + // as the existing backup. This behaves similar to + // [FirestoreAdmin.CreateDatabase][mockgcp.firestore.admin.v1.FirestoreAdmin.CreateDatabase] + // except instead of creating a new empty database, a new database is created + // with the database type, index configuration, and documents from an existing + // backup. + // + // The [long-running operation][google.longrunning.Operation] can be used to + // track the progress of the restore, with the Operation's + // [metadata][google.longrunning.Operation.metadata] field type being the + // [RestoreDatabaseMetadata][mockgcp.firestore.admin.v1.RestoreDatabaseMetadata]. + // The [response][google.longrunning.Operation.response] type is the + // [Database][mockgcp.firestore.admin.v1.Database] if the restore was + // successful. The new database is not readable or writeable until the LRO has + // completed. + RestoreDatabase(context.Context, *RestoreDatabaseRequest) (*longrunningpb.Operation, error) + // Creates a backup schedule on a database. + // At most two backup schedules can be configured on a database, one daily + // backup schedule and one weekly backup schedule. + CreateBackupSchedule(context.Context, *CreateBackupScheduleRequest) (*BackupSchedule, error) + // Gets information about a backup schedule. + GetBackupSchedule(context.Context, *GetBackupScheduleRequest) (*BackupSchedule, error) + // List backup schedules. + ListBackupSchedules(context.Context, *ListBackupSchedulesRequest) (*ListBackupSchedulesResponse, error) + // Updates a backup schedule. + UpdateBackupSchedule(context.Context, *UpdateBackupScheduleRequest) (*BackupSchedule, error) + // Deletes a backup schedule. + DeleteBackupSchedule(context.Context, *DeleteBackupScheduleRequest) (*empty.Empty, error) + mustEmbedUnimplementedFirestoreAdminServer() +} + +// UnimplementedFirestoreAdminServer must be embedded to have forward compatible implementations. +type UnimplementedFirestoreAdminServer struct { +} + +func (UnimplementedFirestoreAdminServer) CreateIndex(context.Context, *CreateIndexRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateIndex not implemented") +} +func (UnimplementedFirestoreAdminServer) ListIndexes(context.Context, *ListIndexesRequest) (*ListIndexesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListIndexes not implemented") +} +func (UnimplementedFirestoreAdminServer) GetIndex(context.Context, *GetIndexRequest) (*Index, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetIndex not implemented") +} +func (UnimplementedFirestoreAdminServer) DeleteIndex(context.Context, *DeleteIndexRequest) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteIndex not implemented") +} +func (UnimplementedFirestoreAdminServer) GetField(context.Context, *GetFieldRequest) (*Field, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetField not implemented") +} +func (UnimplementedFirestoreAdminServer) UpdateField(context.Context, *UpdateFieldRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateField not implemented") +} +func (UnimplementedFirestoreAdminServer) ListFields(context.Context, *ListFieldsRequest) (*ListFieldsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListFields not implemented") +} +func (UnimplementedFirestoreAdminServer) ExportDocuments(context.Context, *ExportDocumentsRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExportDocuments not implemented") +} +func (UnimplementedFirestoreAdminServer) ImportDocuments(context.Context, *ImportDocumentsRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method ImportDocuments not implemented") +} +func (UnimplementedFirestoreAdminServer) BulkDeleteDocuments(context.Context, *BulkDeleteDocumentsRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method BulkDeleteDocuments not implemented") +} +func (UnimplementedFirestoreAdminServer) CreateDatabase(context.Context, *CreateDatabaseRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateDatabase not implemented") +} +func (UnimplementedFirestoreAdminServer) GetDatabase(context.Context, *GetDatabaseRequest) (*Database, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDatabase not implemented") +} +func (UnimplementedFirestoreAdminServer) ListDatabases(context.Context, *ListDatabasesRequest) (*ListDatabasesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListDatabases not implemented") +} +func (UnimplementedFirestoreAdminServer) UpdateDatabase(context.Context, *UpdateDatabaseRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateDatabase not implemented") +} +func (UnimplementedFirestoreAdminServer) DeleteDatabase(context.Context, *DeleteDatabaseRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteDatabase not implemented") +} +func (UnimplementedFirestoreAdminServer) GetBackup(context.Context, *GetBackupRequest) (*Backup, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBackup not implemented") +} +func (UnimplementedFirestoreAdminServer) ListBackups(context.Context, *ListBackupsRequest) (*ListBackupsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListBackups not implemented") +} +func (UnimplementedFirestoreAdminServer) DeleteBackup(context.Context, *DeleteBackupRequest) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteBackup not implemented") +} +func (UnimplementedFirestoreAdminServer) RestoreDatabase(context.Context, *RestoreDatabaseRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method RestoreDatabase not implemented") +} +func (UnimplementedFirestoreAdminServer) CreateBackupSchedule(context.Context, *CreateBackupScheduleRequest) (*BackupSchedule, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateBackupSchedule not implemented") +} +func (UnimplementedFirestoreAdminServer) GetBackupSchedule(context.Context, *GetBackupScheduleRequest) (*BackupSchedule, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBackupSchedule not implemented") +} +func (UnimplementedFirestoreAdminServer) ListBackupSchedules(context.Context, *ListBackupSchedulesRequest) (*ListBackupSchedulesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListBackupSchedules not implemented") +} +func (UnimplementedFirestoreAdminServer) UpdateBackupSchedule(context.Context, *UpdateBackupScheduleRequest) (*BackupSchedule, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateBackupSchedule not implemented") +} +func (UnimplementedFirestoreAdminServer) DeleteBackupSchedule(context.Context, *DeleteBackupScheduleRequest) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteBackupSchedule not implemented") +} +func (UnimplementedFirestoreAdminServer) mustEmbedUnimplementedFirestoreAdminServer() {} + +// UnsafeFirestoreAdminServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to FirestoreAdminServer will +// result in compilation errors. +type UnsafeFirestoreAdminServer interface { + mustEmbedUnimplementedFirestoreAdminServer() +} + +func RegisterFirestoreAdminServer(s grpc.ServiceRegistrar, srv FirestoreAdminServer) { + s.RegisterService(&FirestoreAdmin_ServiceDesc, srv) +} + +func _FirestoreAdmin_CreateIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateIndexRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FirestoreAdminServer).CreateIndex(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/mockgcp.firestore.admin.v1.FirestoreAdmin/CreateIndex", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FirestoreAdminServer).CreateIndex(ctx, req.(*CreateIndexRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FirestoreAdmin_ListIndexes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListIndexesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FirestoreAdminServer).ListIndexes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/mockgcp.firestore.admin.v1.FirestoreAdmin/ListIndexes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FirestoreAdminServer).ListIndexes(ctx, req.(*ListIndexesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FirestoreAdmin_GetIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetIndexRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FirestoreAdminServer).GetIndex(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/mockgcp.firestore.admin.v1.FirestoreAdmin/GetIndex", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FirestoreAdminServer).GetIndex(ctx, req.(*GetIndexRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FirestoreAdmin_DeleteIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteIndexRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FirestoreAdminServer).DeleteIndex(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/mockgcp.firestore.admin.v1.FirestoreAdmin/DeleteIndex", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FirestoreAdminServer).DeleteIndex(ctx, req.(*DeleteIndexRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FirestoreAdmin_GetField_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetFieldRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FirestoreAdminServer).GetField(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/mockgcp.firestore.admin.v1.FirestoreAdmin/GetField", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FirestoreAdminServer).GetField(ctx, req.(*GetFieldRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FirestoreAdmin_UpdateField_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateFieldRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FirestoreAdminServer).UpdateField(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/mockgcp.firestore.admin.v1.FirestoreAdmin/UpdateField", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FirestoreAdminServer).UpdateField(ctx, req.(*UpdateFieldRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FirestoreAdmin_ListFields_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListFieldsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FirestoreAdminServer).ListFields(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/mockgcp.firestore.admin.v1.FirestoreAdmin/ListFields", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FirestoreAdminServer).ListFields(ctx, req.(*ListFieldsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FirestoreAdmin_ExportDocuments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExportDocumentsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FirestoreAdminServer).ExportDocuments(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/mockgcp.firestore.admin.v1.FirestoreAdmin/ExportDocuments", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FirestoreAdminServer).ExportDocuments(ctx, req.(*ExportDocumentsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FirestoreAdmin_ImportDocuments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ImportDocumentsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FirestoreAdminServer).ImportDocuments(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/mockgcp.firestore.admin.v1.FirestoreAdmin/ImportDocuments", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FirestoreAdminServer).ImportDocuments(ctx, req.(*ImportDocumentsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FirestoreAdmin_BulkDeleteDocuments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BulkDeleteDocumentsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FirestoreAdminServer).BulkDeleteDocuments(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/mockgcp.firestore.admin.v1.FirestoreAdmin/BulkDeleteDocuments", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FirestoreAdminServer).BulkDeleteDocuments(ctx, req.(*BulkDeleteDocumentsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FirestoreAdmin_CreateDatabase_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateDatabaseRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FirestoreAdminServer).CreateDatabase(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/mockgcp.firestore.admin.v1.FirestoreAdmin/CreateDatabase", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FirestoreAdminServer).CreateDatabase(ctx, req.(*CreateDatabaseRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FirestoreAdmin_GetDatabase_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDatabaseRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FirestoreAdminServer).GetDatabase(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/mockgcp.firestore.admin.v1.FirestoreAdmin/GetDatabase", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FirestoreAdminServer).GetDatabase(ctx, req.(*GetDatabaseRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FirestoreAdmin_ListDatabases_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListDatabasesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FirestoreAdminServer).ListDatabases(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/mockgcp.firestore.admin.v1.FirestoreAdmin/ListDatabases", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FirestoreAdminServer).ListDatabases(ctx, req.(*ListDatabasesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FirestoreAdmin_UpdateDatabase_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateDatabaseRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FirestoreAdminServer).UpdateDatabase(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/mockgcp.firestore.admin.v1.FirestoreAdmin/UpdateDatabase", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FirestoreAdminServer).UpdateDatabase(ctx, req.(*UpdateDatabaseRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FirestoreAdmin_DeleteDatabase_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteDatabaseRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FirestoreAdminServer).DeleteDatabase(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/mockgcp.firestore.admin.v1.FirestoreAdmin/DeleteDatabase", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FirestoreAdminServer).DeleteDatabase(ctx, req.(*DeleteDatabaseRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FirestoreAdmin_GetBackup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBackupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FirestoreAdminServer).GetBackup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/mockgcp.firestore.admin.v1.FirestoreAdmin/GetBackup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FirestoreAdminServer).GetBackup(ctx, req.(*GetBackupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FirestoreAdmin_ListBackups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListBackupsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FirestoreAdminServer).ListBackups(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/mockgcp.firestore.admin.v1.FirestoreAdmin/ListBackups", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FirestoreAdminServer).ListBackups(ctx, req.(*ListBackupsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FirestoreAdmin_DeleteBackup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteBackupRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FirestoreAdminServer).DeleteBackup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/mockgcp.firestore.admin.v1.FirestoreAdmin/DeleteBackup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FirestoreAdminServer).DeleteBackup(ctx, req.(*DeleteBackupRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FirestoreAdmin_RestoreDatabase_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RestoreDatabaseRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FirestoreAdminServer).RestoreDatabase(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/mockgcp.firestore.admin.v1.FirestoreAdmin/RestoreDatabase", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FirestoreAdminServer).RestoreDatabase(ctx, req.(*RestoreDatabaseRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FirestoreAdmin_CreateBackupSchedule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateBackupScheduleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FirestoreAdminServer).CreateBackupSchedule(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/mockgcp.firestore.admin.v1.FirestoreAdmin/CreateBackupSchedule", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FirestoreAdminServer).CreateBackupSchedule(ctx, req.(*CreateBackupScheduleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FirestoreAdmin_GetBackupSchedule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBackupScheduleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FirestoreAdminServer).GetBackupSchedule(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/mockgcp.firestore.admin.v1.FirestoreAdmin/GetBackupSchedule", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FirestoreAdminServer).GetBackupSchedule(ctx, req.(*GetBackupScheduleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FirestoreAdmin_ListBackupSchedules_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListBackupSchedulesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FirestoreAdminServer).ListBackupSchedules(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/mockgcp.firestore.admin.v1.FirestoreAdmin/ListBackupSchedules", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FirestoreAdminServer).ListBackupSchedules(ctx, req.(*ListBackupSchedulesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FirestoreAdmin_UpdateBackupSchedule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateBackupScheduleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FirestoreAdminServer).UpdateBackupSchedule(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/mockgcp.firestore.admin.v1.FirestoreAdmin/UpdateBackupSchedule", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FirestoreAdminServer).UpdateBackupSchedule(ctx, req.(*UpdateBackupScheduleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FirestoreAdmin_DeleteBackupSchedule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteBackupScheduleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FirestoreAdminServer).DeleteBackupSchedule(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/mockgcp.firestore.admin.v1.FirestoreAdmin/DeleteBackupSchedule", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FirestoreAdminServer).DeleteBackupSchedule(ctx, req.(*DeleteBackupScheduleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// FirestoreAdmin_ServiceDesc is the grpc.ServiceDesc for FirestoreAdmin service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var FirestoreAdmin_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "mockgcp.firestore.admin.v1.FirestoreAdmin", + HandlerType: (*FirestoreAdminServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateIndex", + Handler: _FirestoreAdmin_CreateIndex_Handler, + }, + { + MethodName: "ListIndexes", + Handler: _FirestoreAdmin_ListIndexes_Handler, + }, + { + MethodName: "GetIndex", + Handler: _FirestoreAdmin_GetIndex_Handler, + }, + { + MethodName: "DeleteIndex", + Handler: _FirestoreAdmin_DeleteIndex_Handler, + }, + { + MethodName: "GetField", + Handler: _FirestoreAdmin_GetField_Handler, + }, + { + MethodName: "UpdateField", + Handler: _FirestoreAdmin_UpdateField_Handler, + }, + { + MethodName: "ListFields", + Handler: _FirestoreAdmin_ListFields_Handler, + }, + { + MethodName: "ExportDocuments", + Handler: _FirestoreAdmin_ExportDocuments_Handler, + }, + { + MethodName: "ImportDocuments", + Handler: _FirestoreAdmin_ImportDocuments_Handler, + }, + { + MethodName: "BulkDeleteDocuments", + Handler: _FirestoreAdmin_BulkDeleteDocuments_Handler, + }, + { + MethodName: "CreateDatabase", + Handler: _FirestoreAdmin_CreateDatabase_Handler, + }, + { + MethodName: "GetDatabase", + Handler: _FirestoreAdmin_GetDatabase_Handler, + }, + { + MethodName: "ListDatabases", + Handler: _FirestoreAdmin_ListDatabases_Handler, + }, + { + MethodName: "UpdateDatabase", + Handler: _FirestoreAdmin_UpdateDatabase_Handler, + }, + { + MethodName: "DeleteDatabase", + Handler: _FirestoreAdmin_DeleteDatabase_Handler, + }, + { + MethodName: "GetBackup", + Handler: _FirestoreAdmin_GetBackup_Handler, + }, + { + MethodName: "ListBackups", + Handler: _FirestoreAdmin_ListBackups_Handler, + }, + { + MethodName: "DeleteBackup", + Handler: _FirestoreAdmin_DeleteBackup_Handler, + }, + { + MethodName: "RestoreDatabase", + Handler: _FirestoreAdmin_RestoreDatabase_Handler, + }, + { + MethodName: "CreateBackupSchedule", + Handler: _FirestoreAdmin_CreateBackupSchedule_Handler, + }, + { + MethodName: "GetBackupSchedule", + Handler: _FirestoreAdmin_GetBackupSchedule_Handler, + }, + { + MethodName: "ListBackupSchedules", + Handler: _FirestoreAdmin_ListBackupSchedules_Handler, + }, + { + MethodName: "UpdateBackupSchedule", + Handler: _FirestoreAdmin_UpdateBackupSchedule_Handler, + }, + { + MethodName: "DeleteBackupSchedule", + Handler: _FirestoreAdmin_DeleteBackupSchedule_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "mockgcp/firestore/admin/v1/firestore_admin.proto", +} diff --git a/mockgcp/generated/mockgcp/firestore/admin/v1/index.pb.go b/mockgcp/generated/mockgcp/firestore/admin/v1/index.pb.go new file mode 100644 index 0000000000..30b79ec707 --- /dev/null +++ b/mockgcp/generated/mockgcp/firestore/admin/v1/index.pb.go @@ -0,0 +1,901 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v3.12.4 +// source: mockgcp/firestore/admin/v1/index.proto + +package adminpb + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Query Scope defines the scope at which a query is run. This is specified on +// a StructuredQuery's `from` field. +type Index_QueryScope int32 + +const ( + // The query scope is unspecified. Not a valid option. + Index_QUERY_SCOPE_UNSPECIFIED Index_QueryScope = 0 + // Indexes with a collection query scope specified allow queries + // against a collection that is the child of a specific document, specified + // at query time, and that has the collection ID specified by the index. + Index_COLLECTION Index_QueryScope = 1 + // Indexes with a collection group query scope specified allow queries + // against all collections that has the collection ID specified by the + // index. + Index_COLLECTION_GROUP Index_QueryScope = 2 + // Include all the collections's ancestor in the index. Only available for + // Datastore Mode databases. + Index_COLLECTION_RECURSIVE Index_QueryScope = 3 +) + +// Enum value maps for Index_QueryScope. +var ( + Index_QueryScope_name = map[int32]string{ + 0: "QUERY_SCOPE_UNSPECIFIED", + 1: "COLLECTION", + 2: "COLLECTION_GROUP", + 3: "COLLECTION_RECURSIVE", + } + Index_QueryScope_value = map[string]int32{ + "QUERY_SCOPE_UNSPECIFIED": 0, + "COLLECTION": 1, + "COLLECTION_GROUP": 2, + "COLLECTION_RECURSIVE": 3, + } +) + +func (x Index_QueryScope) Enum() *Index_QueryScope { + p := new(Index_QueryScope) + *p = x + return p +} + +func (x Index_QueryScope) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Index_QueryScope) Descriptor() protoreflect.EnumDescriptor { + return file_mockgcp_firestore_admin_v1_index_proto_enumTypes[0].Descriptor() +} + +func (Index_QueryScope) Type() protoreflect.EnumType { + return &file_mockgcp_firestore_admin_v1_index_proto_enumTypes[0] +} + +func (x Index_QueryScope) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Index_QueryScope.Descriptor instead. +func (Index_QueryScope) EnumDescriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_index_proto_rawDescGZIP(), []int{0, 0} +} + +// API Scope defines the APIs (Firestore Native, or Firestore in +// Datastore Mode) that are supported for queries. +type Index_ApiScope int32 + +const ( + // The index can only be used by the Firestore Native query API. + // This is the default. + Index_ANY_API Index_ApiScope = 0 + // The index can only be used by the Firestore in Datastore Mode query API. + Index_DATASTORE_MODE_API Index_ApiScope = 1 +) + +// Enum value maps for Index_ApiScope. +var ( + Index_ApiScope_name = map[int32]string{ + 0: "ANY_API", + 1: "DATASTORE_MODE_API", + } + Index_ApiScope_value = map[string]int32{ + "ANY_API": 0, + "DATASTORE_MODE_API": 1, + } +) + +func (x Index_ApiScope) Enum() *Index_ApiScope { + p := new(Index_ApiScope) + *p = x + return p +} + +func (x Index_ApiScope) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Index_ApiScope) Descriptor() protoreflect.EnumDescriptor { + return file_mockgcp_firestore_admin_v1_index_proto_enumTypes[1].Descriptor() +} + +func (Index_ApiScope) Type() protoreflect.EnumType { + return &file_mockgcp_firestore_admin_v1_index_proto_enumTypes[1] +} + +func (x Index_ApiScope) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Index_ApiScope.Descriptor instead. +func (Index_ApiScope) EnumDescriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_index_proto_rawDescGZIP(), []int{0, 1} +} + +// The state of an index. During index creation, an index will be in the +// `CREATING` state. If the index is created successfully, it will transition +// to the `READY` state. If the index creation encounters a problem, the index +// will transition to the `NEEDS_REPAIR` state. +type Index_State int32 + +const ( + // The state is unspecified. + Index_STATE_UNSPECIFIED Index_State = 0 + // The index is being created. + // There is an active long-running operation for the index. + // The index is updated when writing a document. + // Some index data may exist. + Index_CREATING Index_State = 1 + // The index is ready to be used. + // The index is updated when writing a document. + // The index is fully populated from all stored documents it applies to. + Index_READY Index_State = 2 + // The index was being created, but something went wrong. + // There is no active long-running operation for the index, + // and the most recently finished long-running operation failed. + // The index is not updated when writing a document. + // Some index data may exist. + // Use the google.longrunning.Operations API to determine why the operation + // that last attempted to create this index failed, then re-create the + // index. + Index_NEEDS_REPAIR Index_State = 3 +) + +// Enum value maps for Index_State. +var ( + Index_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "CREATING", + 2: "READY", + 3: "NEEDS_REPAIR", + } + Index_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "NEEDS_REPAIR": 3, + } +) + +func (x Index_State) Enum() *Index_State { + p := new(Index_State) + *p = x + return p +} + +func (x Index_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Index_State) Descriptor() protoreflect.EnumDescriptor { + return file_mockgcp_firestore_admin_v1_index_proto_enumTypes[2].Descriptor() +} + +func (Index_State) Type() protoreflect.EnumType { + return &file_mockgcp_firestore_admin_v1_index_proto_enumTypes[2] +} + +func (x Index_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Index_State.Descriptor instead. +func (Index_State) EnumDescriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_index_proto_rawDescGZIP(), []int{0, 2} +} + +// The supported orderings. +type Index_IndexField_Order int32 + +const ( + // The ordering is unspecified. Not a valid option. + Index_IndexField_ORDER_UNSPECIFIED Index_IndexField_Order = 0 + // The field is ordered by ascending field value. + Index_IndexField_ASCENDING Index_IndexField_Order = 1 + // The field is ordered by descending field value. + Index_IndexField_DESCENDING Index_IndexField_Order = 2 +) + +// Enum value maps for Index_IndexField_Order. +var ( + Index_IndexField_Order_name = map[int32]string{ + 0: "ORDER_UNSPECIFIED", + 1: "ASCENDING", + 2: "DESCENDING", + } + Index_IndexField_Order_value = map[string]int32{ + "ORDER_UNSPECIFIED": 0, + "ASCENDING": 1, + "DESCENDING": 2, + } +) + +func (x Index_IndexField_Order) Enum() *Index_IndexField_Order { + p := new(Index_IndexField_Order) + *p = x + return p +} + +func (x Index_IndexField_Order) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Index_IndexField_Order) Descriptor() protoreflect.EnumDescriptor { + return file_mockgcp_firestore_admin_v1_index_proto_enumTypes[3].Descriptor() +} + +func (Index_IndexField_Order) Type() protoreflect.EnumType { + return &file_mockgcp_firestore_admin_v1_index_proto_enumTypes[3] +} + +func (x Index_IndexField_Order) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Index_IndexField_Order.Descriptor instead. +func (Index_IndexField_Order) EnumDescriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_index_proto_rawDescGZIP(), []int{0, 0, 0} +} + +// The supported array value configurations. +type Index_IndexField_ArrayConfig int32 + +const ( + // The index does not support additional array queries. + Index_IndexField_ARRAY_CONFIG_UNSPECIFIED Index_IndexField_ArrayConfig = 0 + // The index supports array containment queries. + Index_IndexField_CONTAINS Index_IndexField_ArrayConfig = 1 +) + +// Enum value maps for Index_IndexField_ArrayConfig. +var ( + Index_IndexField_ArrayConfig_name = map[int32]string{ + 0: "ARRAY_CONFIG_UNSPECIFIED", + 1: "CONTAINS", + } + Index_IndexField_ArrayConfig_value = map[string]int32{ + "ARRAY_CONFIG_UNSPECIFIED": 0, + "CONTAINS": 1, + } +) + +func (x Index_IndexField_ArrayConfig) Enum() *Index_IndexField_ArrayConfig { + p := new(Index_IndexField_ArrayConfig) + *p = x + return p +} + +func (x Index_IndexField_ArrayConfig) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Index_IndexField_ArrayConfig) Descriptor() protoreflect.EnumDescriptor { + return file_mockgcp_firestore_admin_v1_index_proto_enumTypes[4].Descriptor() +} + +func (Index_IndexField_ArrayConfig) Type() protoreflect.EnumType { + return &file_mockgcp_firestore_admin_v1_index_proto_enumTypes[4] +} + +func (x Index_IndexField_ArrayConfig) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Index_IndexField_ArrayConfig.Descriptor instead. +func (Index_IndexField_ArrayConfig) EnumDescriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_index_proto_rawDescGZIP(), []int{0, 0, 1} +} + +// Cloud Firestore indexes enable simple and complex queries against +// documents in a database. +type Index struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. A server defined name for this index. + // The form of this name for composite indexes will be: + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` + // For single field indexes, this field will be empty. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Indexes with a collection query scope specified allow queries + // against a collection that is the child of a specific document, specified at + // query time, and that has the same collection ID. + // + // Indexes with a collection group query scope specified allow queries against + // all collections descended from a specific document, specified at query + // time, and that have the same collection ID as this index. + QueryScope Index_QueryScope `protobuf:"varint,2,opt,name=query_scope,json=queryScope,proto3,enum=mockgcp.firestore.admin.v1.Index_QueryScope" json:"query_scope,omitempty"` + // The API scope supported by this index. + ApiScope Index_ApiScope `protobuf:"varint,5,opt,name=api_scope,json=apiScope,proto3,enum=mockgcp.firestore.admin.v1.Index_ApiScope" json:"api_scope,omitempty"` + // The fields supported by this index. + // + // For composite indexes, this requires a minimum of 2 and a maximum of 100 + // fields. The last field entry is always for the field path `__name__`. If, + // on creation, `__name__` was not specified as the last field, it will be + // added automatically with the same direction as that of the last field + // defined. If the final field in a composite index is not directional, the + // `__name__` will be ordered ASCENDING (unless explicitly specified). + // + // For single field indexes, this will always be exactly one entry with a + // field path equal to the field path of the associated field. + Fields []*Index_IndexField `protobuf:"bytes,3,rep,name=fields,proto3" json:"fields,omitempty"` + // Output only. The serving state of the index. + State Index_State `protobuf:"varint,4,opt,name=state,proto3,enum=mockgcp.firestore.admin.v1.Index_State" json:"state,omitempty"` +} + +func (x *Index) Reset() { + *x = Index{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_index_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Index) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Index) ProtoMessage() {} + +func (x *Index) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_index_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Index.ProtoReflect.Descriptor instead. +func (*Index) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_index_proto_rawDescGZIP(), []int{0} +} + +func (x *Index) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Index) GetQueryScope() Index_QueryScope { + if x != nil { + return x.QueryScope + } + return Index_QUERY_SCOPE_UNSPECIFIED +} + +func (x *Index) GetApiScope() Index_ApiScope { + if x != nil { + return x.ApiScope + } + return Index_ANY_API +} + +func (x *Index) GetFields() []*Index_IndexField { + if x != nil { + return x.Fields + } + return nil +} + +func (x *Index) GetState() Index_State { + if x != nil { + return x.State + } + return Index_STATE_UNSPECIFIED +} + +// A field in an index. +// The field_path describes which field is indexed, the value_mode describes +// how the field value is indexed. +type Index_IndexField struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Can be __name__. + // For single field indexes, this must match the name of the field or may + // be omitted. + FieldPath string `protobuf:"bytes,1,opt,name=field_path,json=fieldPath,proto3" json:"field_path,omitempty"` + // How the field value is indexed. + // + // Types that are assignable to ValueMode: + // + // *Index_IndexField_Order_ + // *Index_IndexField_ArrayConfig_ + // *Index_IndexField_VectorConfig_ + ValueMode isIndex_IndexField_ValueMode `protobuf_oneof:"value_mode"` +} + +func (x *Index_IndexField) Reset() { + *x = Index_IndexField{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_index_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Index_IndexField) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Index_IndexField) ProtoMessage() {} + +func (x *Index_IndexField) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_index_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Index_IndexField.ProtoReflect.Descriptor instead. +func (*Index_IndexField) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_index_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *Index_IndexField) GetFieldPath() string { + if x != nil { + return x.FieldPath + } + return "" +} + +func (m *Index_IndexField) GetValueMode() isIndex_IndexField_ValueMode { + if m != nil { + return m.ValueMode + } + return nil +} + +func (x *Index_IndexField) GetOrder() Index_IndexField_Order { + if x, ok := x.GetValueMode().(*Index_IndexField_Order_); ok { + return x.Order + } + return Index_IndexField_ORDER_UNSPECIFIED +} + +func (x *Index_IndexField) GetArrayConfig() Index_IndexField_ArrayConfig { + if x, ok := x.GetValueMode().(*Index_IndexField_ArrayConfig_); ok { + return x.ArrayConfig + } + return Index_IndexField_ARRAY_CONFIG_UNSPECIFIED +} + +func (x *Index_IndexField) GetVectorConfig() *Index_IndexField_VectorConfig { + if x, ok := x.GetValueMode().(*Index_IndexField_VectorConfig_); ok { + return x.VectorConfig + } + return nil +} + +type isIndex_IndexField_ValueMode interface { + isIndex_IndexField_ValueMode() +} + +type Index_IndexField_Order_ struct { + // Indicates that this field supports ordering by the specified order or + // comparing using =, !=, <, <=, >, >=. + Order Index_IndexField_Order `protobuf:"varint,2,opt,name=order,proto3,enum=mockgcp.firestore.admin.v1.Index_IndexField_Order,oneof"` +} + +type Index_IndexField_ArrayConfig_ struct { + // Indicates that this field supports operations on `array_value`s. + ArrayConfig Index_IndexField_ArrayConfig `protobuf:"varint,3,opt,name=array_config,json=arrayConfig,proto3,enum=mockgcp.firestore.admin.v1.Index_IndexField_ArrayConfig,oneof"` +} + +type Index_IndexField_VectorConfig_ struct { + // Indicates that this field supports nearest neighbor and distance + // operations on vector. + VectorConfig *Index_IndexField_VectorConfig `protobuf:"bytes,4,opt,name=vector_config,json=vectorConfig,proto3,oneof"` +} + +func (*Index_IndexField_Order_) isIndex_IndexField_ValueMode() {} + +func (*Index_IndexField_ArrayConfig_) isIndex_IndexField_ValueMode() {} + +func (*Index_IndexField_VectorConfig_) isIndex_IndexField_ValueMode() {} + +// The index configuration to support vector search operations +type Index_IndexField_VectorConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The vector dimension this configuration applies to. + // + // The resulting index will only include vectors of this dimension, and + // can be used for vector search with the same dimension. + Dimension int32 `protobuf:"varint,1,opt,name=dimension,proto3" json:"dimension,omitempty"` + // The type of index used. + // + // Types that are assignable to Type: + // + // *Index_IndexField_VectorConfig_Flat + Type isIndex_IndexField_VectorConfig_Type `protobuf_oneof:"type"` +} + +func (x *Index_IndexField_VectorConfig) Reset() { + *x = Index_IndexField_VectorConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_index_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Index_IndexField_VectorConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Index_IndexField_VectorConfig) ProtoMessage() {} + +func (x *Index_IndexField_VectorConfig) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_index_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Index_IndexField_VectorConfig.ProtoReflect.Descriptor instead. +func (*Index_IndexField_VectorConfig) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_index_proto_rawDescGZIP(), []int{0, 0, 0} +} + +func (x *Index_IndexField_VectorConfig) GetDimension() int32 { + if x != nil { + return x.Dimension + } + return 0 +} + +func (m *Index_IndexField_VectorConfig) GetType() isIndex_IndexField_VectorConfig_Type { + if m != nil { + return m.Type + } + return nil +} + +func (x *Index_IndexField_VectorConfig) GetFlat() *Index_IndexField_VectorConfig_FlatIndex { + if x, ok := x.GetType().(*Index_IndexField_VectorConfig_Flat); ok { + return x.Flat + } + return nil +} + +type isIndex_IndexField_VectorConfig_Type interface { + isIndex_IndexField_VectorConfig_Type() +} + +type Index_IndexField_VectorConfig_Flat struct { + // Indicates the vector index is a flat index. + Flat *Index_IndexField_VectorConfig_FlatIndex `protobuf:"bytes,2,opt,name=flat,proto3,oneof"` +} + +func (*Index_IndexField_VectorConfig_Flat) isIndex_IndexField_VectorConfig_Type() {} + +// An index that stores vectors in a flat data structure, and supports +// exhaustive search. +type Index_IndexField_VectorConfig_FlatIndex struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Index_IndexField_VectorConfig_FlatIndex) Reset() { + *x = Index_IndexField_VectorConfig_FlatIndex{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_index_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Index_IndexField_VectorConfig_FlatIndex) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Index_IndexField_VectorConfig_FlatIndex) ProtoMessage() {} + +func (x *Index_IndexField_VectorConfig_FlatIndex) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_index_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Index_IndexField_VectorConfig_FlatIndex.ProtoReflect.Descriptor instead. +func (*Index_IndexField_VectorConfig_FlatIndex) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_index_proto_rawDescGZIP(), []int{0, 0, 0, 0} +} + +var File_mockgcp_firestore_admin_v1_index_proto protoreflect.FileDescriptor + +var file_mockgcp_firestore_admin_v1_index_proto_rawDesc = []byte{ + 0x0a, 0x26, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, + 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x82, 0x0a, 0x0a, 0x05, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4d, + 0x0a, 0x0b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, + 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, + 0x65, 0x52, 0x0a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x47, 0x0a, + 0x09, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x2a, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x2e, 0x41, 0x70, 0x69, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x08, 0x61, 0x70, + 0x69, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x44, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, + 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x3d, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x6d, 0x6f, + 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x1a, 0xe4, 0x04, 0x0a, 0x0a, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x50, 0x61, 0x74, 0x68, 0x12, 0x4a, 0x0a, 0x05, 0x6f, 0x72, 0x64, + 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, + 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x48, 0x00, 0x52, 0x05, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x5d, 0x0a, 0x0c, 0x61, 0x72, 0x72, 0x61, 0x79, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x6d, 0x6f, + 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x41, 0x72, 0x72, 0x61, 0x79, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x61, 0x72, 0x72, 0x61, 0x79, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x60, 0x0a, 0x0d, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x6d, 0x6f, + 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0c, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xa1, 0x01, 0x0a, 0x0c, 0x56, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x21, 0x0a, 0x09, 0x64, 0x69, 0x6d, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x09, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x59, 0x0a, 0x04, 0x66, 0x6c, + 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, + 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2e, 0x46, 0x6c, 0x61, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x48, 0x00, 0x52, + 0x04, 0x66, 0x6c, 0x61, 0x74, 0x1a, 0x0b, 0x0a, 0x09, 0x46, 0x6c, 0x61, 0x74, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3d, 0x0a, 0x05, 0x4f, 0x72, + 0x64, 0x65, 0x72, 0x12, 0x15, 0x0a, 0x11, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x53, + 0x43, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x45, 0x53, + 0x43, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x22, 0x39, 0x0a, 0x0b, 0x41, 0x72, 0x72, + 0x61, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, 0x0a, 0x18, 0x41, 0x52, 0x52, 0x41, + 0x59, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, + 0x4e, 0x53, 0x10, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6d, 0x6f, + 0x64, 0x65, 0x22, 0x69, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x6f, 0x70, 0x65, + 0x12, 0x1b, 0x0a, 0x17, 0x51, 0x55, 0x45, 0x52, 0x59, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, + 0x0a, 0x43, 0x4f, 0x4c, 0x4c, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x14, 0x0a, + 0x10, 0x43, 0x4f, 0x4c, 0x4c, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x47, 0x52, 0x4f, 0x55, + 0x50, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x4f, 0x4c, 0x4c, 0x45, 0x43, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x52, 0x45, 0x43, 0x55, 0x52, 0x53, 0x49, 0x56, 0x45, 0x10, 0x03, 0x22, 0x2f, 0x0a, + 0x08, 0x41, 0x70, 0x69, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x41, 0x4e, 0x59, + 0x5f, 0x41, 0x50, 0x49, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x44, 0x41, 0x54, 0x41, 0x53, 0x54, + 0x4f, 0x52, 0x45, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x41, 0x50, 0x49, 0x10, 0x01, 0x22, 0x49, + 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, + 0x0a, 0x08, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, + 0x52, 0x45, 0x41, 0x44, 0x59, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4e, 0x45, 0x45, 0x44, 0x53, + 0x5f, 0x52, 0x45, 0x50, 0x41, 0x49, 0x52, 0x10, 0x03, 0x3a, 0x7a, 0xea, 0x41, 0x77, 0x0a, 0x1e, + 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x55, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x7b, 0x64, 0x61, + 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x7d, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x7b, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x2f, 0x7b, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x7d, 0x42, 0xda, 0x01, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x6f, + 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x66, 0x69, 0x72, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x70, 0x62, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x70, + 0x62, 0xa2, 0x02, 0x04, 0x47, 0x43, 0x46, 0x53, 0xaa, 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x46, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, + 0x65, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1f, 0x47, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x46, 0x69, 0x72, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x5c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x5c, 0x56, 0x31, 0xea, 0x02, 0x23, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x46, 0x69, + 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x3a, 0x3a, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_mockgcp_firestore_admin_v1_index_proto_rawDescOnce sync.Once + file_mockgcp_firestore_admin_v1_index_proto_rawDescData = file_mockgcp_firestore_admin_v1_index_proto_rawDesc +) + +func file_mockgcp_firestore_admin_v1_index_proto_rawDescGZIP() []byte { + file_mockgcp_firestore_admin_v1_index_proto_rawDescOnce.Do(func() { + file_mockgcp_firestore_admin_v1_index_proto_rawDescData = protoimpl.X.CompressGZIP(file_mockgcp_firestore_admin_v1_index_proto_rawDescData) + }) + return file_mockgcp_firestore_admin_v1_index_proto_rawDescData +} + +var file_mockgcp_firestore_admin_v1_index_proto_enumTypes = make([]protoimpl.EnumInfo, 5) +var file_mockgcp_firestore_admin_v1_index_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_mockgcp_firestore_admin_v1_index_proto_goTypes = []interface{}{ + (Index_QueryScope)(0), // 0: mockgcp.firestore.admin.v1.Index.QueryScope + (Index_ApiScope)(0), // 1: mockgcp.firestore.admin.v1.Index.ApiScope + (Index_State)(0), // 2: mockgcp.firestore.admin.v1.Index.State + (Index_IndexField_Order)(0), // 3: mockgcp.firestore.admin.v1.Index.IndexField.Order + (Index_IndexField_ArrayConfig)(0), // 4: mockgcp.firestore.admin.v1.Index.IndexField.ArrayConfig + (*Index)(nil), // 5: mockgcp.firestore.admin.v1.Index + (*Index_IndexField)(nil), // 6: mockgcp.firestore.admin.v1.Index.IndexField + (*Index_IndexField_VectorConfig)(nil), // 7: mockgcp.firestore.admin.v1.Index.IndexField.VectorConfig + (*Index_IndexField_VectorConfig_FlatIndex)(nil), // 8: mockgcp.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex +} +var file_mockgcp_firestore_admin_v1_index_proto_depIdxs = []int32{ + 0, // 0: mockgcp.firestore.admin.v1.Index.query_scope:type_name -> mockgcp.firestore.admin.v1.Index.QueryScope + 1, // 1: mockgcp.firestore.admin.v1.Index.api_scope:type_name -> mockgcp.firestore.admin.v1.Index.ApiScope + 6, // 2: mockgcp.firestore.admin.v1.Index.fields:type_name -> mockgcp.firestore.admin.v1.Index.IndexField + 2, // 3: mockgcp.firestore.admin.v1.Index.state:type_name -> mockgcp.firestore.admin.v1.Index.State + 3, // 4: mockgcp.firestore.admin.v1.Index.IndexField.order:type_name -> mockgcp.firestore.admin.v1.Index.IndexField.Order + 4, // 5: mockgcp.firestore.admin.v1.Index.IndexField.array_config:type_name -> mockgcp.firestore.admin.v1.Index.IndexField.ArrayConfig + 7, // 6: mockgcp.firestore.admin.v1.Index.IndexField.vector_config:type_name -> mockgcp.firestore.admin.v1.Index.IndexField.VectorConfig + 8, // 7: mockgcp.firestore.admin.v1.Index.IndexField.VectorConfig.flat:type_name -> mockgcp.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_mockgcp_firestore_admin_v1_index_proto_init() } +func file_mockgcp_firestore_admin_v1_index_proto_init() { + if File_mockgcp_firestore_admin_v1_index_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_mockgcp_firestore_admin_v1_index_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Index); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_index_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Index_IndexField); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_index_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Index_IndexField_VectorConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_index_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Index_IndexField_VectorConfig_FlatIndex); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_mockgcp_firestore_admin_v1_index_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*Index_IndexField_Order_)(nil), + (*Index_IndexField_ArrayConfig_)(nil), + (*Index_IndexField_VectorConfig_)(nil), + } + file_mockgcp_firestore_admin_v1_index_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*Index_IndexField_VectorConfig_Flat)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_mockgcp_firestore_admin_v1_index_proto_rawDesc, + NumEnums: 5, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_mockgcp_firestore_admin_v1_index_proto_goTypes, + DependencyIndexes: file_mockgcp_firestore_admin_v1_index_proto_depIdxs, + EnumInfos: file_mockgcp_firestore_admin_v1_index_proto_enumTypes, + MessageInfos: file_mockgcp_firestore_admin_v1_index_proto_msgTypes, + }.Build() + File_mockgcp_firestore_admin_v1_index_proto = out.File + file_mockgcp_firestore_admin_v1_index_proto_rawDesc = nil + file_mockgcp_firestore_admin_v1_index_proto_goTypes = nil + file_mockgcp_firestore_admin_v1_index_proto_depIdxs = nil +} diff --git a/mockgcp/generated/mockgcp/firestore/admin/v1/location.pb.go b/mockgcp/generated/mockgcp/firestore/admin/v1/location.pb.go new file mode 100644 index 0000000000..c6a62c9587 --- /dev/null +++ b/mockgcp/generated/mockgcp/firestore/admin/v1/location.pb.go @@ -0,0 +1,164 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v3.12.4 +// source: mockgcp/firestore/admin/v1/location.proto + +package adminpb + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The metadata message for +// [mockgcp.cloud.location.Location.metadata][mockgcp.cloud.location.Location.metadata]. +type LocationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *LocationMetadata) Reset() { + *x = LocationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_location_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LocationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LocationMetadata) ProtoMessage() {} + +func (x *LocationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_location_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LocationMetadata.ProtoReflect.Descriptor instead. +func (*LocationMetadata) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_location_proto_rawDescGZIP(), []int{0} +} + +var File_mockgcp_firestore_admin_v1_location_proto protoreflect.FileDescriptor + +var file_mockgcp_firestore_admin_v1_location_proto_rawDesc = []byte{ + 0x0a, 0x29, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x6d, 0x6f, 0x63, + 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x22, 0x12, 0x0a, 0x10, 0x4c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0xdd, 0x01, 0x0a, 0x1e, + 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0d, + 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x39, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x76, 0x31, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x70, 0x62, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x70, 0x62, 0xa2, 0x02, 0x04, 0x47, 0x43, 0x46, + 0x53, 0xaa, 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x46, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, + 0x75, 0x64, 0x5c, 0x46, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5c, 0x41, 0x64, 0x6d, + 0x69, 0x6e, 0x5c, 0x56, 0x31, 0xea, 0x02, 0x23, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, + 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x46, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x3a, 0x3a, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_mockgcp_firestore_admin_v1_location_proto_rawDescOnce sync.Once + file_mockgcp_firestore_admin_v1_location_proto_rawDescData = file_mockgcp_firestore_admin_v1_location_proto_rawDesc +) + +func file_mockgcp_firestore_admin_v1_location_proto_rawDescGZIP() []byte { + file_mockgcp_firestore_admin_v1_location_proto_rawDescOnce.Do(func() { + file_mockgcp_firestore_admin_v1_location_proto_rawDescData = protoimpl.X.CompressGZIP(file_mockgcp_firestore_admin_v1_location_proto_rawDescData) + }) + return file_mockgcp_firestore_admin_v1_location_proto_rawDescData +} + +var file_mockgcp_firestore_admin_v1_location_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_mockgcp_firestore_admin_v1_location_proto_goTypes = []interface{}{ + (*LocationMetadata)(nil), // 0: mockgcp.firestore.admin.v1.LocationMetadata +} +var file_mockgcp_firestore_admin_v1_location_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_mockgcp_firestore_admin_v1_location_proto_init() } +func file_mockgcp_firestore_admin_v1_location_proto_init() { + if File_mockgcp_firestore_admin_v1_location_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_mockgcp_firestore_admin_v1_location_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LocationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_mockgcp_firestore_admin_v1_location_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_mockgcp_firestore_admin_v1_location_proto_goTypes, + DependencyIndexes: file_mockgcp_firestore_admin_v1_location_proto_depIdxs, + MessageInfos: file_mockgcp_firestore_admin_v1_location_proto_msgTypes, + }.Build() + File_mockgcp_firestore_admin_v1_location_proto = out.File + file_mockgcp_firestore_admin_v1_location_proto_rawDesc = nil + file_mockgcp_firestore_admin_v1_location_proto_goTypes = nil + file_mockgcp_firestore_admin_v1_location_proto_depIdxs = nil +} diff --git a/mockgcp/generated/mockgcp/firestore/admin/v1/operation.pb.go b/mockgcp/generated/mockgcp/firestore/admin/v1/operation.pb.go new file mode 100644 index 0000000000..8df04e54c6 --- /dev/null +++ b/mockgcp/generated/mockgcp/firestore/admin/v1/operation.pb.go @@ -0,0 +1,1602 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v3.12.4 +// source: mockgcp/firestore/admin/v1/operation.proto + +package adminpb + +import ( + timestamp "github.com/golang/protobuf/ptypes/timestamp" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Describes the state of the operation. +type OperationState int32 + +const ( + // Unspecified. + OperationState_OPERATION_STATE_UNSPECIFIED OperationState = 0 + // Request is being prepared for processing. + OperationState_INITIALIZING OperationState = 1 + // Request is actively being processed. + OperationState_PROCESSING OperationState = 2 + // Request is in the process of being cancelled after user called + // google.longrunning.Operations.CancelOperation on the operation. + OperationState_CANCELLING OperationState = 3 + // Request has been processed and is in its finalization stage. + OperationState_FINALIZING OperationState = 4 + // Request has completed successfully. + OperationState_SUCCESSFUL OperationState = 5 + // Request has finished being processed, but encountered an error. + OperationState_FAILED OperationState = 6 + // Request has finished being cancelled after user called + // google.longrunning.Operations.CancelOperation. + OperationState_CANCELLED OperationState = 7 +) + +// Enum value maps for OperationState. +var ( + OperationState_name = map[int32]string{ + 0: "OPERATION_STATE_UNSPECIFIED", + 1: "INITIALIZING", + 2: "PROCESSING", + 3: "CANCELLING", + 4: "FINALIZING", + 5: "SUCCESSFUL", + 6: "FAILED", + 7: "CANCELLED", + } + OperationState_value = map[string]int32{ + "OPERATION_STATE_UNSPECIFIED": 0, + "INITIALIZING": 1, + "PROCESSING": 2, + "CANCELLING": 3, + "FINALIZING": 4, + "SUCCESSFUL": 5, + "FAILED": 6, + "CANCELLED": 7, + } +) + +func (x OperationState) Enum() *OperationState { + p := new(OperationState) + *p = x + return p +} + +func (x OperationState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (OperationState) Descriptor() protoreflect.EnumDescriptor { + return file_mockgcp_firestore_admin_v1_operation_proto_enumTypes[0].Descriptor() +} + +func (OperationState) Type() protoreflect.EnumType { + return &file_mockgcp_firestore_admin_v1_operation_proto_enumTypes[0] +} + +func (x OperationState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use OperationState.Descriptor instead. +func (OperationState) EnumDescriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_operation_proto_rawDescGZIP(), []int{0} +} + +// Specifies how the index is changing. +type FieldOperationMetadata_IndexConfigDelta_ChangeType int32 + +const ( + // The type of change is not specified or known. + FieldOperationMetadata_IndexConfigDelta_CHANGE_TYPE_UNSPECIFIED FieldOperationMetadata_IndexConfigDelta_ChangeType = 0 + // The single field index is being added. + FieldOperationMetadata_IndexConfigDelta_ADD FieldOperationMetadata_IndexConfigDelta_ChangeType = 1 + // The single field index is being removed. + FieldOperationMetadata_IndexConfigDelta_REMOVE FieldOperationMetadata_IndexConfigDelta_ChangeType = 2 +) + +// Enum value maps for FieldOperationMetadata_IndexConfigDelta_ChangeType. +var ( + FieldOperationMetadata_IndexConfigDelta_ChangeType_name = map[int32]string{ + 0: "CHANGE_TYPE_UNSPECIFIED", + 1: "ADD", + 2: "REMOVE", + } + FieldOperationMetadata_IndexConfigDelta_ChangeType_value = map[string]int32{ + "CHANGE_TYPE_UNSPECIFIED": 0, + "ADD": 1, + "REMOVE": 2, + } +) + +func (x FieldOperationMetadata_IndexConfigDelta_ChangeType) Enum() *FieldOperationMetadata_IndexConfigDelta_ChangeType { + p := new(FieldOperationMetadata_IndexConfigDelta_ChangeType) + *p = x + return p +} + +func (x FieldOperationMetadata_IndexConfigDelta_ChangeType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FieldOperationMetadata_IndexConfigDelta_ChangeType) Descriptor() protoreflect.EnumDescriptor { + return file_mockgcp_firestore_admin_v1_operation_proto_enumTypes[1].Descriptor() +} + +func (FieldOperationMetadata_IndexConfigDelta_ChangeType) Type() protoreflect.EnumType { + return &file_mockgcp_firestore_admin_v1_operation_proto_enumTypes[1] +} + +func (x FieldOperationMetadata_IndexConfigDelta_ChangeType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FieldOperationMetadata_IndexConfigDelta_ChangeType.Descriptor instead. +func (FieldOperationMetadata_IndexConfigDelta_ChangeType) EnumDescriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_operation_proto_rawDescGZIP(), []int{1, 0, 0} +} + +// Specifies how the TTL config is changing. +type FieldOperationMetadata_TtlConfigDelta_ChangeType int32 + +const ( + // The type of change is not specified or known. + FieldOperationMetadata_TtlConfigDelta_CHANGE_TYPE_UNSPECIFIED FieldOperationMetadata_TtlConfigDelta_ChangeType = 0 + // The TTL config is being added. + FieldOperationMetadata_TtlConfigDelta_ADD FieldOperationMetadata_TtlConfigDelta_ChangeType = 1 + // The TTL config is being removed. + FieldOperationMetadata_TtlConfigDelta_REMOVE FieldOperationMetadata_TtlConfigDelta_ChangeType = 2 +) + +// Enum value maps for FieldOperationMetadata_TtlConfigDelta_ChangeType. +var ( + FieldOperationMetadata_TtlConfigDelta_ChangeType_name = map[int32]string{ + 0: "CHANGE_TYPE_UNSPECIFIED", + 1: "ADD", + 2: "REMOVE", + } + FieldOperationMetadata_TtlConfigDelta_ChangeType_value = map[string]int32{ + "CHANGE_TYPE_UNSPECIFIED": 0, + "ADD": 1, + "REMOVE": 2, + } +) + +func (x FieldOperationMetadata_TtlConfigDelta_ChangeType) Enum() *FieldOperationMetadata_TtlConfigDelta_ChangeType { + p := new(FieldOperationMetadata_TtlConfigDelta_ChangeType) + *p = x + return p +} + +func (x FieldOperationMetadata_TtlConfigDelta_ChangeType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FieldOperationMetadata_TtlConfigDelta_ChangeType) Descriptor() protoreflect.EnumDescriptor { + return file_mockgcp_firestore_admin_v1_operation_proto_enumTypes[2].Descriptor() +} + +func (FieldOperationMetadata_TtlConfigDelta_ChangeType) Type() protoreflect.EnumType { + return &file_mockgcp_firestore_admin_v1_operation_proto_enumTypes[2] +} + +func (x FieldOperationMetadata_TtlConfigDelta_ChangeType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FieldOperationMetadata_TtlConfigDelta_ChangeType.Descriptor instead. +func (FieldOperationMetadata_TtlConfigDelta_ChangeType) EnumDescriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_operation_proto_rawDescGZIP(), []int{1, 1, 0} +} + +// Metadata for [google.longrunning.Operation][google.longrunning.Operation] +// results from +// [FirestoreAdmin.CreateIndex][mockgcp.firestore.admin.v1.FirestoreAdmin.CreateIndex]. +type IndexOperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The time this operation started. + StartTime *timestamp.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // The time this operation completed. Will be unset if operation still in + // progress. + EndTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + // The index resource that this operation is acting on. For example: + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + Index string `protobuf:"bytes,3,opt,name=index,proto3" json:"index,omitempty"` + // The state of the operation. + State OperationState `protobuf:"varint,4,opt,name=state,proto3,enum=mockgcp.firestore.admin.v1.OperationState" json:"state,omitempty"` + // The progress, in documents, of this operation. + ProgressDocuments *Progress `protobuf:"bytes,5,opt,name=progress_documents,json=progressDocuments,proto3" json:"progress_documents,omitempty"` + // The progress, in bytes, of this operation. + ProgressBytes *Progress `protobuf:"bytes,6,opt,name=progress_bytes,json=progressBytes,proto3" json:"progress_bytes,omitempty"` +} + +func (x *IndexOperationMetadata) Reset() { + *x = IndexOperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_operation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IndexOperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IndexOperationMetadata) ProtoMessage() {} + +func (x *IndexOperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_operation_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IndexOperationMetadata.ProtoReflect.Descriptor instead. +func (*IndexOperationMetadata) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_operation_proto_rawDescGZIP(), []int{0} +} + +func (x *IndexOperationMetadata) GetStartTime() *timestamp.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +func (x *IndexOperationMetadata) GetEndTime() *timestamp.Timestamp { + if x != nil { + return x.EndTime + } + return nil +} + +func (x *IndexOperationMetadata) GetIndex() string { + if x != nil { + return x.Index + } + return "" +} + +func (x *IndexOperationMetadata) GetState() OperationState { + if x != nil { + return x.State + } + return OperationState_OPERATION_STATE_UNSPECIFIED +} + +func (x *IndexOperationMetadata) GetProgressDocuments() *Progress { + if x != nil { + return x.ProgressDocuments + } + return nil +} + +func (x *IndexOperationMetadata) GetProgressBytes() *Progress { + if x != nil { + return x.ProgressBytes + } + return nil +} + +// Metadata for [google.longrunning.Operation][google.longrunning.Operation] +// results from +// [FirestoreAdmin.UpdateField][mockgcp.firestore.admin.v1.FirestoreAdmin.UpdateField]. +type FieldOperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The time this operation started. + StartTime *timestamp.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // The time this operation completed. Will be unset if operation still in + // progress. + EndTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + // The field resource that this operation is acting on. For example: + // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + Field string `protobuf:"bytes,3,opt,name=field,proto3" json:"field,omitempty"` + // A list of + // [IndexConfigDelta][mockgcp.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], + // which describe the intent of this operation. + IndexConfigDeltas []*FieldOperationMetadata_IndexConfigDelta `protobuf:"bytes,4,rep,name=index_config_deltas,json=indexConfigDeltas,proto3" json:"index_config_deltas,omitempty"` + // The state of the operation. + State OperationState `protobuf:"varint,5,opt,name=state,proto3,enum=mockgcp.firestore.admin.v1.OperationState" json:"state,omitempty"` + // The progress, in documents, of this operation. + ProgressDocuments *Progress `protobuf:"bytes,6,opt,name=progress_documents,json=progressDocuments,proto3" json:"progress_documents,omitempty"` + // The progress, in bytes, of this operation. + ProgressBytes *Progress `protobuf:"bytes,7,opt,name=progress_bytes,json=progressBytes,proto3" json:"progress_bytes,omitempty"` + // Describes the deltas of TTL configuration. + TtlConfigDelta *FieldOperationMetadata_TtlConfigDelta `protobuf:"bytes,8,opt,name=ttl_config_delta,json=ttlConfigDelta,proto3" json:"ttl_config_delta,omitempty"` +} + +func (x *FieldOperationMetadata) Reset() { + *x = FieldOperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_operation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FieldOperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FieldOperationMetadata) ProtoMessage() {} + +func (x *FieldOperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_operation_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FieldOperationMetadata.ProtoReflect.Descriptor instead. +func (*FieldOperationMetadata) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_operation_proto_rawDescGZIP(), []int{1} +} + +func (x *FieldOperationMetadata) GetStartTime() *timestamp.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +func (x *FieldOperationMetadata) GetEndTime() *timestamp.Timestamp { + if x != nil { + return x.EndTime + } + return nil +} + +func (x *FieldOperationMetadata) GetField() string { + if x != nil { + return x.Field + } + return "" +} + +func (x *FieldOperationMetadata) GetIndexConfigDeltas() []*FieldOperationMetadata_IndexConfigDelta { + if x != nil { + return x.IndexConfigDeltas + } + return nil +} + +func (x *FieldOperationMetadata) GetState() OperationState { + if x != nil { + return x.State + } + return OperationState_OPERATION_STATE_UNSPECIFIED +} + +func (x *FieldOperationMetadata) GetProgressDocuments() *Progress { + if x != nil { + return x.ProgressDocuments + } + return nil +} + +func (x *FieldOperationMetadata) GetProgressBytes() *Progress { + if x != nil { + return x.ProgressBytes + } + return nil +} + +func (x *FieldOperationMetadata) GetTtlConfigDelta() *FieldOperationMetadata_TtlConfigDelta { + if x != nil { + return x.TtlConfigDelta + } + return nil +} + +// Metadata for [google.longrunning.Operation][google.longrunning.Operation] +// results from +// [FirestoreAdmin.ExportDocuments][mockgcp.firestore.admin.v1.FirestoreAdmin.ExportDocuments]. +type ExportDocumentsMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The time this operation started. + StartTime *timestamp.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // The time this operation completed. Will be unset if operation still in + // progress. + EndTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + // The state of the export operation. + OperationState OperationState `protobuf:"varint,3,opt,name=operation_state,json=operationState,proto3,enum=mockgcp.firestore.admin.v1.OperationState" json:"operation_state,omitempty"` + // The progress, in documents, of this operation. + ProgressDocuments *Progress `protobuf:"bytes,4,opt,name=progress_documents,json=progressDocuments,proto3" json:"progress_documents,omitempty"` + // The progress, in bytes, of this operation. + ProgressBytes *Progress `protobuf:"bytes,5,opt,name=progress_bytes,json=progressBytes,proto3" json:"progress_bytes,omitempty"` + // Which collection IDs are being exported. + CollectionIds []string `protobuf:"bytes,6,rep,name=collection_ids,json=collectionIds,proto3" json:"collection_ids,omitempty"` + // Where the documents are being exported to. + OutputUriPrefix string `protobuf:"bytes,7,opt,name=output_uri_prefix,json=outputUriPrefix,proto3" json:"output_uri_prefix,omitempty"` + // Which namespace IDs are being exported. + NamespaceIds []string `protobuf:"bytes,8,rep,name=namespace_ids,json=namespaceIds,proto3" json:"namespace_ids,omitempty"` + // The timestamp that corresponds to the version of the database that is being + // exported. If unspecified, there are no guarantees about the consistency of + // the documents being exported. + SnapshotTime *timestamp.Timestamp `protobuf:"bytes,9,opt,name=snapshot_time,json=snapshotTime,proto3" json:"snapshot_time,omitempty"` +} + +func (x *ExportDocumentsMetadata) Reset() { + *x = ExportDocumentsMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_operation_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExportDocumentsMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportDocumentsMetadata) ProtoMessage() {} + +func (x *ExportDocumentsMetadata) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_operation_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExportDocumentsMetadata.ProtoReflect.Descriptor instead. +func (*ExportDocumentsMetadata) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_operation_proto_rawDescGZIP(), []int{2} +} + +func (x *ExportDocumentsMetadata) GetStartTime() *timestamp.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +func (x *ExportDocumentsMetadata) GetEndTime() *timestamp.Timestamp { + if x != nil { + return x.EndTime + } + return nil +} + +func (x *ExportDocumentsMetadata) GetOperationState() OperationState { + if x != nil { + return x.OperationState + } + return OperationState_OPERATION_STATE_UNSPECIFIED +} + +func (x *ExportDocumentsMetadata) GetProgressDocuments() *Progress { + if x != nil { + return x.ProgressDocuments + } + return nil +} + +func (x *ExportDocumentsMetadata) GetProgressBytes() *Progress { + if x != nil { + return x.ProgressBytes + } + return nil +} + +func (x *ExportDocumentsMetadata) GetCollectionIds() []string { + if x != nil { + return x.CollectionIds + } + return nil +} + +func (x *ExportDocumentsMetadata) GetOutputUriPrefix() string { + if x != nil { + return x.OutputUriPrefix + } + return "" +} + +func (x *ExportDocumentsMetadata) GetNamespaceIds() []string { + if x != nil { + return x.NamespaceIds + } + return nil +} + +func (x *ExportDocumentsMetadata) GetSnapshotTime() *timestamp.Timestamp { + if x != nil { + return x.SnapshotTime + } + return nil +} + +// Metadata for [google.longrunning.Operation][google.longrunning.Operation] +// results from +// [FirestoreAdmin.ImportDocuments][mockgcp.firestore.admin.v1.FirestoreAdmin.ImportDocuments]. +type ImportDocumentsMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The time this operation started. + StartTime *timestamp.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // The time this operation completed. Will be unset if operation still in + // progress. + EndTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + // The state of the import operation. + OperationState OperationState `protobuf:"varint,3,opt,name=operation_state,json=operationState,proto3,enum=mockgcp.firestore.admin.v1.OperationState" json:"operation_state,omitempty"` + // The progress, in documents, of this operation. + ProgressDocuments *Progress `protobuf:"bytes,4,opt,name=progress_documents,json=progressDocuments,proto3" json:"progress_documents,omitempty"` + // The progress, in bytes, of this operation. + ProgressBytes *Progress `protobuf:"bytes,5,opt,name=progress_bytes,json=progressBytes,proto3" json:"progress_bytes,omitempty"` + // Which collection IDs are being imported. + CollectionIds []string `protobuf:"bytes,6,rep,name=collection_ids,json=collectionIds,proto3" json:"collection_ids,omitempty"` + // The location of the documents being imported. + InputUriPrefix string `protobuf:"bytes,7,opt,name=input_uri_prefix,json=inputUriPrefix,proto3" json:"input_uri_prefix,omitempty"` + // Which namespace IDs are being imported. + NamespaceIds []string `protobuf:"bytes,8,rep,name=namespace_ids,json=namespaceIds,proto3" json:"namespace_ids,omitempty"` +} + +func (x *ImportDocumentsMetadata) Reset() { + *x = ImportDocumentsMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_operation_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ImportDocumentsMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ImportDocumentsMetadata) ProtoMessage() {} + +func (x *ImportDocumentsMetadata) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_operation_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ImportDocumentsMetadata.ProtoReflect.Descriptor instead. +func (*ImportDocumentsMetadata) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_operation_proto_rawDescGZIP(), []int{3} +} + +func (x *ImportDocumentsMetadata) GetStartTime() *timestamp.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +func (x *ImportDocumentsMetadata) GetEndTime() *timestamp.Timestamp { + if x != nil { + return x.EndTime + } + return nil +} + +func (x *ImportDocumentsMetadata) GetOperationState() OperationState { + if x != nil { + return x.OperationState + } + return OperationState_OPERATION_STATE_UNSPECIFIED +} + +func (x *ImportDocumentsMetadata) GetProgressDocuments() *Progress { + if x != nil { + return x.ProgressDocuments + } + return nil +} + +func (x *ImportDocumentsMetadata) GetProgressBytes() *Progress { + if x != nil { + return x.ProgressBytes + } + return nil +} + +func (x *ImportDocumentsMetadata) GetCollectionIds() []string { + if x != nil { + return x.CollectionIds + } + return nil +} + +func (x *ImportDocumentsMetadata) GetInputUriPrefix() string { + if x != nil { + return x.InputUriPrefix + } + return "" +} + +func (x *ImportDocumentsMetadata) GetNamespaceIds() []string { + if x != nil { + return x.NamespaceIds + } + return nil +} + +// Metadata for [google.longrunning.Operation][google.longrunning.Operation] +// results from +// [FirestoreAdmin.BulkDeleteDocuments][mockgcp.firestore.admin.v1.FirestoreAdmin.BulkDeleteDocuments]. +type BulkDeleteDocumentsMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The time this operation started. + StartTime *timestamp.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // The time this operation completed. Will be unset if operation still in + // progress. + EndTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + // The state of the operation. + OperationState OperationState `protobuf:"varint,3,opt,name=operation_state,json=operationState,proto3,enum=mockgcp.firestore.admin.v1.OperationState" json:"operation_state,omitempty"` + // The progress, in documents, of this operation. + ProgressDocuments *Progress `protobuf:"bytes,4,opt,name=progress_documents,json=progressDocuments,proto3" json:"progress_documents,omitempty"` + // The progress, in bytes, of this operation. + ProgressBytes *Progress `protobuf:"bytes,5,opt,name=progress_bytes,json=progressBytes,proto3" json:"progress_bytes,omitempty"` + // The IDs of the collection groups that are being deleted. + CollectionIds []string `protobuf:"bytes,6,rep,name=collection_ids,json=collectionIds,proto3" json:"collection_ids,omitempty"` + // Which namespace IDs are being deleted. + NamespaceIds []string `protobuf:"bytes,7,rep,name=namespace_ids,json=namespaceIds,proto3" json:"namespace_ids,omitempty"` + // The timestamp that corresponds to the version of the database that is being + // read to get the list of documents to delete. This time can also be used as + // the timestamp of PITR in case of disaster recovery (subject to PITR window + // limit). + SnapshotTime *timestamp.Timestamp `protobuf:"bytes,8,opt,name=snapshot_time,json=snapshotTime,proto3" json:"snapshot_time,omitempty"` +} + +func (x *BulkDeleteDocumentsMetadata) Reset() { + *x = BulkDeleteDocumentsMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_operation_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BulkDeleteDocumentsMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BulkDeleteDocumentsMetadata) ProtoMessage() {} + +func (x *BulkDeleteDocumentsMetadata) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_operation_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BulkDeleteDocumentsMetadata.ProtoReflect.Descriptor instead. +func (*BulkDeleteDocumentsMetadata) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_operation_proto_rawDescGZIP(), []int{4} +} + +func (x *BulkDeleteDocumentsMetadata) GetStartTime() *timestamp.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +func (x *BulkDeleteDocumentsMetadata) GetEndTime() *timestamp.Timestamp { + if x != nil { + return x.EndTime + } + return nil +} + +func (x *BulkDeleteDocumentsMetadata) GetOperationState() OperationState { + if x != nil { + return x.OperationState + } + return OperationState_OPERATION_STATE_UNSPECIFIED +} + +func (x *BulkDeleteDocumentsMetadata) GetProgressDocuments() *Progress { + if x != nil { + return x.ProgressDocuments + } + return nil +} + +func (x *BulkDeleteDocumentsMetadata) GetProgressBytes() *Progress { + if x != nil { + return x.ProgressBytes + } + return nil +} + +func (x *BulkDeleteDocumentsMetadata) GetCollectionIds() []string { + if x != nil { + return x.CollectionIds + } + return nil +} + +func (x *BulkDeleteDocumentsMetadata) GetNamespaceIds() []string { + if x != nil { + return x.NamespaceIds + } + return nil +} + +func (x *BulkDeleteDocumentsMetadata) GetSnapshotTime() *timestamp.Timestamp { + if x != nil { + return x.SnapshotTime + } + return nil +} + +// Returned in the [google.longrunning.Operation][google.longrunning.Operation] +// response field. +type ExportDocumentsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Location of the output files. This can be used to begin an import + // into Cloud Firestore (this project or another project) after the operation + // completes successfully. + OutputUriPrefix string `protobuf:"bytes,1,opt,name=output_uri_prefix,json=outputUriPrefix,proto3" json:"output_uri_prefix,omitempty"` +} + +func (x *ExportDocumentsResponse) Reset() { + *x = ExportDocumentsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_operation_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExportDocumentsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExportDocumentsResponse) ProtoMessage() {} + +func (x *ExportDocumentsResponse) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_operation_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExportDocumentsResponse.ProtoReflect.Descriptor instead. +func (*ExportDocumentsResponse) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_operation_proto_rawDescGZIP(), []int{5} +} + +func (x *ExportDocumentsResponse) GetOutputUriPrefix() string { + if x != nil { + return x.OutputUriPrefix + } + return "" +} + +// Metadata for the [long-running operation][google.longrunning.Operation] from +// the [RestoreDatabase][mockgcp.firestore.admin.v1.RestoreDatabase] request. +type RestoreDatabaseMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The time the restore was started. + StartTime *timestamp.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + // The time the restore finished, unset for ongoing restores. + EndTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + // The operation state of the restore. + OperationState OperationState `protobuf:"varint,3,opt,name=operation_state,json=operationState,proto3,enum=mockgcp.firestore.admin.v1.OperationState" json:"operation_state,omitempty"` + // The name of the database being restored to. + Database string `protobuf:"bytes,4,opt,name=database,proto3" json:"database,omitempty"` + // The name of the backup restoring from. + Backup string `protobuf:"bytes,5,opt,name=backup,proto3" json:"backup,omitempty"` + // How far along the restore is as an estimated percentage of remaining time. + ProgressPercentage *Progress `protobuf:"bytes,8,opt,name=progress_percentage,json=progressPercentage,proto3" json:"progress_percentage,omitempty"` +} + +func (x *RestoreDatabaseMetadata) Reset() { + *x = RestoreDatabaseMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_operation_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RestoreDatabaseMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RestoreDatabaseMetadata) ProtoMessage() {} + +func (x *RestoreDatabaseMetadata) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_operation_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RestoreDatabaseMetadata.ProtoReflect.Descriptor instead. +func (*RestoreDatabaseMetadata) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_operation_proto_rawDescGZIP(), []int{6} +} + +func (x *RestoreDatabaseMetadata) GetStartTime() *timestamp.Timestamp { + if x != nil { + return x.StartTime + } + return nil +} + +func (x *RestoreDatabaseMetadata) GetEndTime() *timestamp.Timestamp { + if x != nil { + return x.EndTime + } + return nil +} + +func (x *RestoreDatabaseMetadata) GetOperationState() OperationState { + if x != nil { + return x.OperationState + } + return OperationState_OPERATION_STATE_UNSPECIFIED +} + +func (x *RestoreDatabaseMetadata) GetDatabase() string { + if x != nil { + return x.Database + } + return "" +} + +func (x *RestoreDatabaseMetadata) GetBackup() string { + if x != nil { + return x.Backup + } + return "" +} + +func (x *RestoreDatabaseMetadata) GetProgressPercentage() *Progress { + if x != nil { + return x.ProgressPercentage + } + return nil +} + +// Describes the progress of the operation. +// Unit of work is generic and must be interpreted based on where +// [Progress][mockgcp.firestore.admin.v1.Progress] is used. +type Progress struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The amount of work estimated. + EstimatedWork int64 `protobuf:"varint,1,opt,name=estimated_work,json=estimatedWork,proto3" json:"estimated_work,omitempty"` + // The amount of work completed. + CompletedWork int64 `protobuf:"varint,2,opt,name=completed_work,json=completedWork,proto3" json:"completed_work,omitempty"` +} + +func (x *Progress) Reset() { + *x = Progress{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_operation_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Progress) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Progress) ProtoMessage() {} + +func (x *Progress) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_operation_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Progress.ProtoReflect.Descriptor instead. +func (*Progress) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_operation_proto_rawDescGZIP(), []int{7} +} + +func (x *Progress) GetEstimatedWork() int64 { + if x != nil { + return x.EstimatedWork + } + return 0 +} + +func (x *Progress) GetCompletedWork() int64 { + if x != nil { + return x.CompletedWork + } + return 0 +} + +// Information about an index configuration change. +type FieldOperationMetadata_IndexConfigDelta struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies how the index is changing. + ChangeType FieldOperationMetadata_IndexConfigDelta_ChangeType `protobuf:"varint,1,opt,name=change_type,json=changeType,proto3,enum=mockgcp.firestore.admin.v1.FieldOperationMetadata_IndexConfigDelta_ChangeType" json:"change_type,omitempty"` + // The index being changed. + Index *Index `protobuf:"bytes,2,opt,name=index,proto3" json:"index,omitempty"` +} + +func (x *FieldOperationMetadata_IndexConfigDelta) Reset() { + *x = FieldOperationMetadata_IndexConfigDelta{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_operation_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FieldOperationMetadata_IndexConfigDelta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FieldOperationMetadata_IndexConfigDelta) ProtoMessage() {} + +func (x *FieldOperationMetadata_IndexConfigDelta) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_operation_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FieldOperationMetadata_IndexConfigDelta.ProtoReflect.Descriptor instead. +func (*FieldOperationMetadata_IndexConfigDelta) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_operation_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *FieldOperationMetadata_IndexConfigDelta) GetChangeType() FieldOperationMetadata_IndexConfigDelta_ChangeType { + if x != nil { + return x.ChangeType + } + return FieldOperationMetadata_IndexConfigDelta_CHANGE_TYPE_UNSPECIFIED +} + +func (x *FieldOperationMetadata_IndexConfigDelta) GetIndex() *Index { + if x != nil { + return x.Index + } + return nil +} + +// Information about a TTL configuration change. +type FieldOperationMetadata_TtlConfigDelta struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies how the TTL configuration is changing. + ChangeType FieldOperationMetadata_TtlConfigDelta_ChangeType `protobuf:"varint,1,opt,name=change_type,json=changeType,proto3,enum=mockgcp.firestore.admin.v1.FieldOperationMetadata_TtlConfigDelta_ChangeType" json:"change_type,omitempty"` +} + +func (x *FieldOperationMetadata_TtlConfigDelta) Reset() { + *x = FieldOperationMetadata_TtlConfigDelta{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_operation_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FieldOperationMetadata_TtlConfigDelta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FieldOperationMetadata_TtlConfigDelta) ProtoMessage() {} + +func (x *FieldOperationMetadata_TtlConfigDelta) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_operation_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FieldOperationMetadata_TtlConfigDelta.ProtoReflect.Descriptor instead. +func (*FieldOperationMetadata_TtlConfigDelta) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_operation_proto_rawDescGZIP(), []int{1, 1} +} + +func (x *FieldOperationMetadata_TtlConfigDelta) GetChangeType() FieldOperationMetadata_TtlConfigDelta_ChangeType { + if x != nil { + return x.ChangeType + } + return FieldOperationMetadata_TtlConfigDelta_CHANGE_TYPE_UNSPECIFIED +} + +var File_mockgcp_firestore_admin_v1_operation_proto protoreflect.FileDescriptor + +var file_mockgcp_firestore_admin_v1_operation_proto_rawDesc = []byte{ + 0x0a, 0x2a, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x6d, 0x6f, + 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2f, 0x66, 0x69, 0x72, + 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x2f, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x84, 0x03, 0x0a, + 0x16, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, + 0x40, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, + 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x53, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x64, 0x6f, + 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, + 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x67, 0x72, + 0x65, 0x73, 0x73, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x44, 0x6f, 0x63, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x4b, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, + 0x73, 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, + 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, + 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x67, + 0x72, 0x65, 0x73, 0x73, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, + 0x74, 0x65, 0x73, 0x22, 0xa7, 0x08, 0x0a, 0x16, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x39, + 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x6e, 0x64, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x73, 0x0a, 0x13, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, + 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x52, 0x11, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x73, 0x12, 0x40, 0x0a, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6d, 0x6f, 0x63, + 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x53, 0x0a, + 0x12, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, + 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, + 0x11, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x12, 0x4b, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6d, 0x6f, 0x63, + 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, + 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, + 0x6b, 0x0a, 0x10, 0x74, 0x74, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x64, 0x65, + 0x6c, 0x74, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, + 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x74, + 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x52, 0x0e, 0x74, 0x74, + 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x1a, 0xfc, 0x01, 0x0a, + 0x10, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x65, 0x6c, 0x74, + 0x61, 0x12, 0x6f, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x4e, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, + 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x2e, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x37, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x3e, 0x0a, 0x0a, 0x43, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x48, 0x41, + 0x4e, 0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x44, 0x44, 0x10, 0x01, 0x12, + 0x0a, 0x0a, 0x06, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x10, 0x02, 0x1a, 0xbf, 0x01, 0x0a, 0x0e, + 0x54, 0x74, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x6d, + 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x4c, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, + 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x74, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x3e, 0x0a, + 0x0a, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x43, + 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x44, 0x44, 0x10, + 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x10, 0x02, 0x22, 0xbb, 0x04, + 0x0a, 0x17, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x53, 0x0a, 0x0f, 0x6f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, + 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x53, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x64, 0x6f, 0x63, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6d, + 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, + 0x73, 0x73, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x44, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x4b, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, + 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, + 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x67, 0x72, + 0x65, 0x73, 0x73, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, + 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x69, 0x64, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6c, 0x6c, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x5f, 0x75, 0x72, 0x69, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x55, 0x72, 0x69, 0x50, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x23, 0x0a, 0x0d, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x73, 0x12, 0x3f, 0x0a, 0x0d, 0x73, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0c, 0x73, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xf8, 0x03, 0x0a, 0x17, + 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, + 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x53, 0x0a, 0x0f, 0x6f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, + 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0e, + 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x53, + 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x64, 0x6f, 0x63, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6d, 0x6f, 0x63, + 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, + 0x52, 0x11, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x12, 0x4b, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6d, 0x6f, + 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, + 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, + 0x73, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, + 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x69, 0x6e, 0x70, 0x75, 0x74, + 0x5f, 0x75, 0x72, 0x69, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x55, 0x72, 0x69, 0x50, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x12, 0x23, 0x0a, 0x0d, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, + 0x64, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x49, 0x64, 0x73, 0x22, 0x93, 0x04, 0x0a, 0x1b, 0x42, 0x75, 0x6c, 0x6b, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x53, 0x0a, 0x0f, 0x6f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2a, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0e, 0x6f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x53, 0x0a, + 0x12, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, + 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, + 0x11, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x12, 0x4b, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6d, 0x6f, 0x63, + 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, + 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, + 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x73, 0x12, 0x3f, 0x0a, 0x0d, 0x73, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0c, + 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x45, 0x0a, 0x17, + 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x5f, 0x75, 0x72, 0x69, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x55, 0x72, 0x69, 0x50, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x22, 0xb9, 0x03, 0x0a, 0x17, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x44, + 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x6e, + 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x53, 0x0a, 0x0f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6d, 0x6f, 0x63, + 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x42, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, + 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x66, + 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, + 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x06, 0x62, 0x61, + 0x63, 0x6b, 0x75, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x24, 0xfa, 0x41, 0x21, 0x0a, + 0x1f, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, + 0x52, 0x06, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x12, 0x55, 0x0a, 0x13, 0x70, 0x72, 0x6f, 0x67, + 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, + 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x12, 0x70, 0x72, 0x6f, + 0x67, 0x72, 0x65, 0x73, 0x73, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x22, + 0x58, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x65, + 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0d, 0x65, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x64, 0x57, 0x6f, + 0x72, 0x6b, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, + 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x70, + 0x6c, 0x65, 0x74, 0x65, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x2a, 0x9e, 0x01, 0x0a, 0x0e, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x1b, + 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, + 0x0c, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, + 0x0e, 0x0a, 0x0a, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, + 0x0e, 0x0a, 0x0a, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, + 0x0e, 0x0a, 0x0a, 0x46, 0x49, 0x4e, 0x41, 0x4c, 0x49, 0x5a, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, + 0x0e, 0x0a, 0x0a, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x46, 0x55, 0x4c, 0x10, 0x05, 0x12, + 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x06, 0x12, 0x0d, 0x0a, 0x09, 0x43, + 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x07, 0x42, 0xde, 0x01, 0x0a, 0x1e, 0x63, + 0x6f, 0x6d, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x39, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x76, 0x31, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x70, 0x62, 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x70, 0x62, 0xa2, 0x02, 0x04, 0x47, 0x43, 0x46, + 0x53, 0xaa, 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x46, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, + 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, + 0x75, 0x64, 0x5c, 0x46, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5c, 0x41, 0x64, 0x6d, + 0x69, 0x6e, 0x5c, 0x56, 0x31, 0xea, 0x02, 0x23, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, + 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x46, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x3a, 0x3a, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_mockgcp_firestore_admin_v1_operation_proto_rawDescOnce sync.Once + file_mockgcp_firestore_admin_v1_operation_proto_rawDescData = file_mockgcp_firestore_admin_v1_operation_proto_rawDesc +) + +func file_mockgcp_firestore_admin_v1_operation_proto_rawDescGZIP() []byte { + file_mockgcp_firestore_admin_v1_operation_proto_rawDescOnce.Do(func() { + file_mockgcp_firestore_admin_v1_operation_proto_rawDescData = protoimpl.X.CompressGZIP(file_mockgcp_firestore_admin_v1_operation_proto_rawDescData) + }) + return file_mockgcp_firestore_admin_v1_operation_proto_rawDescData +} + +var file_mockgcp_firestore_admin_v1_operation_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_mockgcp_firestore_admin_v1_operation_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_mockgcp_firestore_admin_v1_operation_proto_goTypes = []interface{}{ + (OperationState)(0), // 0: mockgcp.firestore.admin.v1.OperationState + (FieldOperationMetadata_IndexConfigDelta_ChangeType)(0), // 1: mockgcp.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType + (FieldOperationMetadata_TtlConfigDelta_ChangeType)(0), // 2: mockgcp.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType + (*IndexOperationMetadata)(nil), // 3: mockgcp.firestore.admin.v1.IndexOperationMetadata + (*FieldOperationMetadata)(nil), // 4: mockgcp.firestore.admin.v1.FieldOperationMetadata + (*ExportDocumentsMetadata)(nil), // 5: mockgcp.firestore.admin.v1.ExportDocumentsMetadata + (*ImportDocumentsMetadata)(nil), // 6: mockgcp.firestore.admin.v1.ImportDocumentsMetadata + (*BulkDeleteDocumentsMetadata)(nil), // 7: mockgcp.firestore.admin.v1.BulkDeleteDocumentsMetadata + (*ExportDocumentsResponse)(nil), // 8: mockgcp.firestore.admin.v1.ExportDocumentsResponse + (*RestoreDatabaseMetadata)(nil), // 9: mockgcp.firestore.admin.v1.RestoreDatabaseMetadata + (*Progress)(nil), // 10: mockgcp.firestore.admin.v1.Progress + (*FieldOperationMetadata_IndexConfigDelta)(nil), // 11: mockgcp.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta + (*FieldOperationMetadata_TtlConfigDelta)(nil), // 12: mockgcp.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta + (*timestamp.Timestamp)(nil), // 13: google.protobuf.Timestamp + (*Index)(nil), // 14: mockgcp.firestore.admin.v1.Index +} +var file_mockgcp_firestore_admin_v1_operation_proto_depIdxs = []int32{ + 13, // 0: mockgcp.firestore.admin.v1.IndexOperationMetadata.start_time:type_name -> google.protobuf.Timestamp + 13, // 1: mockgcp.firestore.admin.v1.IndexOperationMetadata.end_time:type_name -> google.protobuf.Timestamp + 0, // 2: mockgcp.firestore.admin.v1.IndexOperationMetadata.state:type_name -> mockgcp.firestore.admin.v1.OperationState + 10, // 3: mockgcp.firestore.admin.v1.IndexOperationMetadata.progress_documents:type_name -> mockgcp.firestore.admin.v1.Progress + 10, // 4: mockgcp.firestore.admin.v1.IndexOperationMetadata.progress_bytes:type_name -> mockgcp.firestore.admin.v1.Progress + 13, // 5: mockgcp.firestore.admin.v1.FieldOperationMetadata.start_time:type_name -> google.protobuf.Timestamp + 13, // 6: mockgcp.firestore.admin.v1.FieldOperationMetadata.end_time:type_name -> google.protobuf.Timestamp + 11, // 7: mockgcp.firestore.admin.v1.FieldOperationMetadata.index_config_deltas:type_name -> mockgcp.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta + 0, // 8: mockgcp.firestore.admin.v1.FieldOperationMetadata.state:type_name -> mockgcp.firestore.admin.v1.OperationState + 10, // 9: mockgcp.firestore.admin.v1.FieldOperationMetadata.progress_documents:type_name -> mockgcp.firestore.admin.v1.Progress + 10, // 10: mockgcp.firestore.admin.v1.FieldOperationMetadata.progress_bytes:type_name -> mockgcp.firestore.admin.v1.Progress + 12, // 11: mockgcp.firestore.admin.v1.FieldOperationMetadata.ttl_config_delta:type_name -> mockgcp.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta + 13, // 12: mockgcp.firestore.admin.v1.ExportDocumentsMetadata.start_time:type_name -> google.protobuf.Timestamp + 13, // 13: mockgcp.firestore.admin.v1.ExportDocumentsMetadata.end_time:type_name -> google.protobuf.Timestamp + 0, // 14: mockgcp.firestore.admin.v1.ExportDocumentsMetadata.operation_state:type_name -> mockgcp.firestore.admin.v1.OperationState + 10, // 15: mockgcp.firestore.admin.v1.ExportDocumentsMetadata.progress_documents:type_name -> mockgcp.firestore.admin.v1.Progress + 10, // 16: mockgcp.firestore.admin.v1.ExportDocumentsMetadata.progress_bytes:type_name -> mockgcp.firestore.admin.v1.Progress + 13, // 17: mockgcp.firestore.admin.v1.ExportDocumentsMetadata.snapshot_time:type_name -> google.protobuf.Timestamp + 13, // 18: mockgcp.firestore.admin.v1.ImportDocumentsMetadata.start_time:type_name -> google.protobuf.Timestamp + 13, // 19: mockgcp.firestore.admin.v1.ImportDocumentsMetadata.end_time:type_name -> google.protobuf.Timestamp + 0, // 20: mockgcp.firestore.admin.v1.ImportDocumentsMetadata.operation_state:type_name -> mockgcp.firestore.admin.v1.OperationState + 10, // 21: mockgcp.firestore.admin.v1.ImportDocumentsMetadata.progress_documents:type_name -> mockgcp.firestore.admin.v1.Progress + 10, // 22: mockgcp.firestore.admin.v1.ImportDocumentsMetadata.progress_bytes:type_name -> mockgcp.firestore.admin.v1.Progress + 13, // 23: mockgcp.firestore.admin.v1.BulkDeleteDocumentsMetadata.start_time:type_name -> google.protobuf.Timestamp + 13, // 24: mockgcp.firestore.admin.v1.BulkDeleteDocumentsMetadata.end_time:type_name -> google.protobuf.Timestamp + 0, // 25: mockgcp.firestore.admin.v1.BulkDeleteDocumentsMetadata.operation_state:type_name -> mockgcp.firestore.admin.v1.OperationState + 10, // 26: mockgcp.firestore.admin.v1.BulkDeleteDocumentsMetadata.progress_documents:type_name -> mockgcp.firestore.admin.v1.Progress + 10, // 27: mockgcp.firestore.admin.v1.BulkDeleteDocumentsMetadata.progress_bytes:type_name -> mockgcp.firestore.admin.v1.Progress + 13, // 28: mockgcp.firestore.admin.v1.BulkDeleteDocumentsMetadata.snapshot_time:type_name -> google.protobuf.Timestamp + 13, // 29: mockgcp.firestore.admin.v1.RestoreDatabaseMetadata.start_time:type_name -> google.protobuf.Timestamp + 13, // 30: mockgcp.firestore.admin.v1.RestoreDatabaseMetadata.end_time:type_name -> google.protobuf.Timestamp + 0, // 31: mockgcp.firestore.admin.v1.RestoreDatabaseMetadata.operation_state:type_name -> mockgcp.firestore.admin.v1.OperationState + 10, // 32: mockgcp.firestore.admin.v1.RestoreDatabaseMetadata.progress_percentage:type_name -> mockgcp.firestore.admin.v1.Progress + 1, // 33: mockgcp.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.change_type:type_name -> mockgcp.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType + 14, // 34: mockgcp.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.index:type_name -> mockgcp.firestore.admin.v1.Index + 2, // 35: mockgcp.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.change_type:type_name -> mockgcp.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType + 36, // [36:36] is the sub-list for method output_type + 36, // [36:36] is the sub-list for method input_type + 36, // [36:36] is the sub-list for extension type_name + 36, // [36:36] is the sub-list for extension extendee + 0, // [0:36] is the sub-list for field type_name +} + +func init() { file_mockgcp_firestore_admin_v1_operation_proto_init() } +func file_mockgcp_firestore_admin_v1_operation_proto_init() { + if File_mockgcp_firestore_admin_v1_operation_proto != nil { + return + } + file_mockgcp_firestore_admin_v1_index_proto_init() + if !protoimpl.UnsafeEnabled { + file_mockgcp_firestore_admin_v1_operation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IndexOperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_operation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FieldOperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_operation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExportDocumentsMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_operation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ImportDocumentsMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_operation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BulkDeleteDocumentsMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_operation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExportDocumentsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_operation_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RestoreDatabaseMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_operation_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Progress); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_operation_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FieldOperationMetadata_IndexConfigDelta); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_operation_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FieldOperationMetadata_TtlConfigDelta); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_mockgcp_firestore_admin_v1_operation_proto_rawDesc, + NumEnums: 3, + NumMessages: 10, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_mockgcp_firestore_admin_v1_operation_proto_goTypes, + DependencyIndexes: file_mockgcp_firestore_admin_v1_operation_proto_depIdxs, + EnumInfos: file_mockgcp_firestore_admin_v1_operation_proto_enumTypes, + MessageInfos: file_mockgcp_firestore_admin_v1_operation_proto_msgTypes, + }.Build() + File_mockgcp_firestore_admin_v1_operation_proto = out.File + file_mockgcp_firestore_admin_v1_operation_proto_rawDesc = nil + file_mockgcp_firestore_admin_v1_operation_proto_goTypes = nil + file_mockgcp_firestore_admin_v1_operation_proto_depIdxs = nil +} diff --git a/mockgcp/generated/mockgcp/firestore/admin/v1/schedule.pb.go b/mockgcp/generated/mockgcp/firestore/admin/v1/schedule.pb.go new file mode 100644 index 0000000000..c5d6bb442f --- /dev/null +++ b/mockgcp/generated/mockgcp/firestore/admin/v1/schedule.pb.go @@ -0,0 +1,448 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v3.12.4 +// source: mockgcp/firestore/admin/v1/schedule.proto + +package adminpb + +import ( + duration "github.com/golang/protobuf/ptypes/duration" + timestamp "github.com/golang/protobuf/ptypes/timestamp" + _ "google.golang.org/genproto/googleapis/api/annotations" + dayofweek "google.golang.org/genproto/googleapis/type/dayofweek" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// A backup schedule for a Cloud Firestore Database. +// +// This resource is owned by the database it is backing up, and is deleted along +// with the database. The actual backups are not though. +type BackupSchedule struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The unique backup schedule identifier across all locations and + // databases for the given project. + // + // This will be auto-assigned. + // + // Format is + // `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Output only. The timestamp at which this backup schedule was created and + // effective since. + // + // No backups will be created for this schedule before this time. + CreateTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. The timestamp at which this backup schedule was most recently + // updated. When a backup schedule is first created, this is the same as + // create_time. + UpdateTime *timestamp.Timestamp `protobuf:"bytes,10,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + // At what relative time in the future, compared to its creation time, + // the backup should be deleted, e.g. keep backups for 7 days. + // + // The maximum supported retention period is 14 weeks. + Retention *duration.Duration `protobuf:"bytes,6,opt,name=retention,proto3" json:"retention,omitempty"` + // A oneof field to represent when backups will be taken. + // + // Types that are assignable to Recurrence: + // + // *BackupSchedule_DailyRecurrence + // *BackupSchedule_WeeklyRecurrence + Recurrence isBackupSchedule_Recurrence `protobuf_oneof:"recurrence"` +} + +func (x *BackupSchedule) Reset() { + *x = BackupSchedule{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_schedule_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BackupSchedule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BackupSchedule) ProtoMessage() {} + +func (x *BackupSchedule) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_schedule_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BackupSchedule.ProtoReflect.Descriptor instead. +func (*BackupSchedule) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_schedule_proto_rawDescGZIP(), []int{0} +} + +func (x *BackupSchedule) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *BackupSchedule) GetCreateTime() *timestamp.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *BackupSchedule) GetUpdateTime() *timestamp.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +func (x *BackupSchedule) GetRetention() *duration.Duration { + if x != nil { + return x.Retention + } + return nil +} + +func (m *BackupSchedule) GetRecurrence() isBackupSchedule_Recurrence { + if m != nil { + return m.Recurrence + } + return nil +} + +func (x *BackupSchedule) GetDailyRecurrence() *DailyRecurrence { + if x, ok := x.GetRecurrence().(*BackupSchedule_DailyRecurrence); ok { + return x.DailyRecurrence + } + return nil +} + +func (x *BackupSchedule) GetWeeklyRecurrence() *WeeklyRecurrence { + if x, ok := x.GetRecurrence().(*BackupSchedule_WeeklyRecurrence); ok { + return x.WeeklyRecurrence + } + return nil +} + +type isBackupSchedule_Recurrence interface { + isBackupSchedule_Recurrence() +} + +type BackupSchedule_DailyRecurrence struct { + // For a schedule that runs daily. + DailyRecurrence *DailyRecurrence `protobuf:"bytes,7,opt,name=daily_recurrence,json=dailyRecurrence,proto3,oneof"` +} + +type BackupSchedule_WeeklyRecurrence struct { + // For a schedule that runs weekly on a specific day. + WeeklyRecurrence *WeeklyRecurrence `protobuf:"bytes,8,opt,name=weekly_recurrence,json=weeklyRecurrence,proto3,oneof"` +} + +func (*BackupSchedule_DailyRecurrence) isBackupSchedule_Recurrence() {} + +func (*BackupSchedule_WeeklyRecurrence) isBackupSchedule_Recurrence() {} + +// Represents a recurring schedule that runs every day. +// +// The time zone is UTC. +type DailyRecurrence struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DailyRecurrence) Reset() { + *x = DailyRecurrence{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_schedule_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DailyRecurrence) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DailyRecurrence) ProtoMessage() {} + +func (x *DailyRecurrence) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_schedule_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DailyRecurrence.ProtoReflect.Descriptor instead. +func (*DailyRecurrence) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_schedule_proto_rawDescGZIP(), []int{1} +} + +// Represents a recurring schedule that runs on a specified day of the week. +// +// The time zone is UTC. +type WeeklyRecurrence struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The day of week to run. + // + // DAY_OF_WEEK_UNSPECIFIED is not allowed. + Day dayofweek.DayOfWeek `protobuf:"varint,2,opt,name=day,proto3,enum=google.type.DayOfWeek" json:"day,omitempty"` +} + +func (x *WeeklyRecurrence) Reset() { + *x = WeeklyRecurrence{} + if protoimpl.UnsafeEnabled { + mi := &file_mockgcp_firestore_admin_v1_schedule_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WeeklyRecurrence) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WeeklyRecurrence) ProtoMessage() {} + +func (x *WeeklyRecurrence) ProtoReflect() protoreflect.Message { + mi := &file_mockgcp_firestore_admin_v1_schedule_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WeeklyRecurrence.ProtoReflect.Descriptor instead. +func (*WeeklyRecurrence) Descriptor() ([]byte, []int) { + return file_mockgcp_firestore_admin_v1_schedule_proto_rawDescGZIP(), []int{2} +} + +func (x *WeeklyRecurrence) GetDay() dayofweek.DayOfWeek { + if x != nil { + return x.Day + } + return dayofweek.DayOfWeek(0) +} + +var File_mockgcp_firestore_admin_v1_schedule_proto protoreflect.FileDescriptor + +var file_mockgcp_firestore_admin_v1_schedule_proto_rawDesc = []byte{ + 0x0a, 0x29, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x68, + 0x65, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x6d, 0x6f, 0x63, + 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, + 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, + 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x2f, 0x64, 0x61, 0x79, 0x6f, 0x66, 0x77, 0x65, 0x65, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xa4, 0x04, 0x0a, 0x0e, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x40, 0x0a, + 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, + 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x37, 0x0a, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x58, 0x0a, 0x10, 0x64, 0x61, + 0x69, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, + 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x61, 0x69, 0x6c, 0x79, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x48, 0x00, 0x52, 0x0f, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x63, 0x65, 0x12, 0x5b, 0x0a, 0x11, 0x77, 0x65, 0x65, 0x6b, 0x6c, 0x79, 0x5f, 0x72, + 0x65, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2c, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x65, 0x65, + 0x6b, 0x6c, 0x79, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, + 0x10, 0x77, 0x65, 0x65, 0x6b, 0x6c, 0x79, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x3a, 0x77, 0xea, 0x41, 0x74, 0x0a, 0x27, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, + 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, + 0x49, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x7d, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x7b, 0x64, + 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x7d, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x53, + 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, + 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x7d, 0x42, 0x0c, 0x0a, 0x0a, 0x72, 0x65, + 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x44, 0x61, 0x69, 0x6c, + 0x79, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x3c, 0x0a, 0x10, 0x57, + 0x65, 0x65, 0x6b, 0x6c, 0x79, 0x52, 0x65, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, + 0x28, 0x0a, 0x03, 0x64, 0x61, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, 0x79, 0x4f, 0x66, + 0x57, 0x65, 0x65, 0x6b, 0x52, 0x03, 0x64, 0x61, 0x79, 0x42, 0xdd, 0x01, 0x0a, 0x1e, 0x63, 0x6f, + 0x6d, 0x2e, 0x6d, 0x6f, 0x63, 0x6b, 0x67, 0x63, 0x70, 0x2e, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x53, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x67, 0x6f, 0x2f, 0x66, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x69, + 0x76, 0x31, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x70, 0x62, + 0x3b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x70, 0x62, 0xa2, 0x02, 0x04, 0x47, 0x43, 0x46, 0x53, 0xaa, + 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x46, + 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x1f, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x5c, 0x46, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5c, 0x41, 0x64, 0x6d, 0x69, 0x6e, + 0x5c, 0x56, 0x31, 0xea, 0x02, 0x23, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, + 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x46, 0x69, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x3a, 0x3a, + 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_mockgcp_firestore_admin_v1_schedule_proto_rawDescOnce sync.Once + file_mockgcp_firestore_admin_v1_schedule_proto_rawDescData = file_mockgcp_firestore_admin_v1_schedule_proto_rawDesc +) + +func file_mockgcp_firestore_admin_v1_schedule_proto_rawDescGZIP() []byte { + file_mockgcp_firestore_admin_v1_schedule_proto_rawDescOnce.Do(func() { + file_mockgcp_firestore_admin_v1_schedule_proto_rawDescData = protoimpl.X.CompressGZIP(file_mockgcp_firestore_admin_v1_schedule_proto_rawDescData) + }) + return file_mockgcp_firestore_admin_v1_schedule_proto_rawDescData +} + +var file_mockgcp_firestore_admin_v1_schedule_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_mockgcp_firestore_admin_v1_schedule_proto_goTypes = []interface{}{ + (*BackupSchedule)(nil), // 0: mockgcp.firestore.admin.v1.BackupSchedule + (*DailyRecurrence)(nil), // 1: mockgcp.firestore.admin.v1.DailyRecurrence + (*WeeklyRecurrence)(nil), // 2: mockgcp.firestore.admin.v1.WeeklyRecurrence + (*timestamp.Timestamp)(nil), // 3: google.protobuf.Timestamp + (*duration.Duration)(nil), // 4: google.protobuf.Duration + (dayofweek.DayOfWeek)(0), // 5: google.type.DayOfWeek +} +var file_mockgcp_firestore_admin_v1_schedule_proto_depIdxs = []int32{ + 3, // 0: mockgcp.firestore.admin.v1.BackupSchedule.create_time:type_name -> google.protobuf.Timestamp + 3, // 1: mockgcp.firestore.admin.v1.BackupSchedule.update_time:type_name -> google.protobuf.Timestamp + 4, // 2: mockgcp.firestore.admin.v1.BackupSchedule.retention:type_name -> google.protobuf.Duration + 1, // 3: mockgcp.firestore.admin.v1.BackupSchedule.daily_recurrence:type_name -> mockgcp.firestore.admin.v1.DailyRecurrence + 2, // 4: mockgcp.firestore.admin.v1.BackupSchedule.weekly_recurrence:type_name -> mockgcp.firestore.admin.v1.WeeklyRecurrence + 5, // 5: mockgcp.firestore.admin.v1.WeeklyRecurrence.day:type_name -> google.type.DayOfWeek + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_mockgcp_firestore_admin_v1_schedule_proto_init() } +func file_mockgcp_firestore_admin_v1_schedule_proto_init() { + if File_mockgcp_firestore_admin_v1_schedule_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_mockgcp_firestore_admin_v1_schedule_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BackupSchedule); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_schedule_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DailyRecurrence); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_mockgcp_firestore_admin_v1_schedule_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WeeklyRecurrence); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_mockgcp_firestore_admin_v1_schedule_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*BackupSchedule_DailyRecurrence)(nil), + (*BackupSchedule_WeeklyRecurrence)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_mockgcp_firestore_admin_v1_schedule_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_mockgcp_firestore_admin_v1_schedule_proto_goTypes, + DependencyIndexes: file_mockgcp_firestore_admin_v1_schedule_proto_depIdxs, + MessageInfos: file_mockgcp_firestore_admin_v1_schedule_proto_msgTypes, + }.Build() + File_mockgcp_firestore_admin_v1_schedule_proto = out.File + file_mockgcp_firestore_admin_v1_schedule_proto_rawDesc = nil + file_mockgcp_firestore_admin_v1_schedule_proto_goTypes = nil + file_mockgcp_firestore_admin_v1_schedule_proto_depIdxs = nil +} diff --git a/mockgcp/mock_http_roundtrip.go b/mockgcp/mock_http_roundtrip.go index 385ed00ab0..122dbc1f8d 100644 --- a/mockgcp/mock_http_roundtrip.go +++ b/mockgcp/mock_http_roundtrip.go @@ -53,6 +53,7 @@ import ( "github.com/GoogleCloudPlatform/k8s-config-connector/mockgcp/mockdataform" "github.com/GoogleCloudPlatform/k8s-config-connector/mockgcp/mockedgecontainer" "github.com/GoogleCloudPlatform/k8s-config-connector/mockgcp/mockedgenetwork" + "github.com/GoogleCloudPlatform/k8s-config-connector/mockgcp/mockfirestore" "github.com/GoogleCloudPlatform/k8s-config-connector/mockgcp/mockgkehub" "github.com/GoogleCloudPlatform/k8s-config-connector/mockgcp/mockgkemulticloud" "github.com/GoogleCloudPlatform/k8s-config-connector/mockgcp/mockiam" @@ -165,6 +166,7 @@ func NewMockRoundTripper(t *testing.T, k8sClient client.Client, storage storage. services = append(services, mockcertificatemanager.New(env, storage)) services = append(services, mockcompute.New(env, storage)) services = append(services, mockdataflow.New(env, storage)) + services = append(services, mockfirestore.New(env, storage)) services = append(services, mockgkemulticloud.New(env, storage)) services = append(services, mockiam.New(env, storage)) services = append(services, mockkms.New(env, storage)) diff --git a/mockgcp/mockfirestore/database.go b/mockgcp/mockfirestore/database.go new file mode 100644 index 0000000000..6691120d45 --- /dev/null +++ b/mockgcp/mockfirestore/database.go @@ -0,0 +1,168 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package mockfirestore + +import ( + "context" + "crypto/md5" + "encoding/base64" + "fmt" + "time" + + "cloud.google.com/go/longrunning/autogen/longrunningpb" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/anypb" + "google.golang.org/protobuf/types/known/durationpb" + "google.golang.org/protobuf/types/known/timestamppb" + + pb "github.com/GoogleCloudPlatform/k8s-config-connector/mockgcp/generated/mockgcp/firestore/admin/v1" +) + +type DatabaseService struct { + *MockService + pb.UnimplementedFirestoreAdminServer +} + +func (s *DatabaseService) GetDatabase(ctx context.Context, req *pb.GetDatabaseRequest) (*pb.Database, error) { + fqn := req.GetName() + + obj := &pb.Database{} + if err := s.storage.Get(ctx, fqn, obj); err != nil { + if status.Code(err) == codes.NotFound { + return nil, status.Errorf(codes.NotFound, "Requested entity was not found.") + } + return nil, err + } + + return obj, nil +} + +func (s *DatabaseService) CreateDatabase(ctx context.Context, req *pb.CreateDatabaseRequest) (*longrunningpb.Operation, error) { + fqn := req.GetDatabase().GetName() + + obj := proto.Clone(req.Database).(*pb.Database) + populateDefaultsForDatabase(obj) + t := timestamppb.New(time.Now()) + obj.CreateTime = t + obj.UpdateTime = t + obj.EarliestVersionTime = t + if err := s.storage.Create(ctx, fqn, obj); err != nil { + return nil, err + } + + metadata := &pb.CreateDatabaseMetadata{} + op, err := s.operations.StartLRO(ctx, fqn, metadata, func() (proto.Message, error) { + result := proto.Clone(obj).(*pb.Database) + return result, nil + }) + if err != nil { + return op, err + } + response, err := anypb.New(obj) + if err != nil { + return op, err + } + op.Result = &longrunningpb.Operation_Response{ + Response: response, + } + return op, err +} + +func (s *DatabaseService) UpdateDatabase(ctx context.Context, req *pb.UpdateDatabaseRequest) (*longrunningpb.Operation, error) { + fqn := req.GetDatabase().GetName() + + existing := &pb.Database{} + if err := s.storage.Get(ctx, fqn, existing); err != nil { + return nil, err + } + + updated := proto.Clone(req.Database).(*pb.Database) + populateDefaultsForDatabase(updated) + updated.UpdateTime = timestamppb.New(time.Now()) + if err := s.storage.Update(ctx, fqn, updated); err != nil { + return nil, err + } + + metadata := &pb.UpdateDatabaseMetadata{} + op, err := s.operations.StartLRO(ctx, fqn, metadata, func() (proto.Message, error) { + result := proto.Clone(updated).(*pb.Database) + return result, nil + }) + if err != nil { + return op, err + } + response, err := anypb.New(updated) + if err != nil { + return op, err + } + op.Result = &longrunningpb.Operation_Response{ + Response: response, + } + return op, err +} + +func (s *DatabaseService) DeleteDatabase(ctx context.Context, req *pb.DeleteDatabaseRequest) (*longrunningpb.Operation, error) { + fqn := req.GetName() + + deleted := &pb.Database{} + if err := s.storage.Delete(ctx, fqn, deleted); err != nil { + return nil, err + } + + metadata := &pb.DeleteDatabaseMetadata{} + op, err := s.operations.StartLRO(ctx, fqn, metadata, func() (proto.Message, error) { + return &pb.Database{}, nil + }) + if err != nil { + return op, err + } + response, err := anypb.New(deleted) + if err != nil { + return op, err + } + op.Result = &longrunningpb.Operation_Response{ + Response: response, + } + return op, err +} + +func populateDefaultsForDatabase(obj *pb.Database) { + if obj.Uid == "" { + obj.Uid = fmt.Sprintf("%x", time.Now().UnixNano()) + } + if obj.ConcurrencyMode == pb.Database_CONCURRENCY_MODE_UNSPECIFIED { + obj.ConcurrencyMode = pb.Database_PESSIMISTIC + } + if obj.PointInTimeRecoveryEnablement == pb.Database_POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED { + obj.PointInTimeRecoveryEnablement = pb.Database_POINT_IN_TIME_RECOVERY_DISABLED + } + if obj.PointInTimeRecoveryEnablement == pb.Database_POINT_IN_TIME_RECOVERY_DISABLED { + obj.VersionRetentionPeriod = durationpb.New(time.Hour) + } else if obj.PointInTimeRecoveryEnablement == pb.Database_POINT_IN_TIME_RECOVERY_ENABLED { + obj.VersionRetentionPeriod = durationpb.New(7 * 24 * time.Hour) + } + obj.Etag = computeEtag(obj) +} + +func computeEtag(obj proto.Message) string { + b, err := proto.Marshal(obj) + if err != nil { + panic(fmt.Sprintf("converting to proto: %v", err)) + } + hash := md5.Sum(b) + return base64.StdEncoding.EncodeToString(hash[:]) +} diff --git a/mockgcp/mockfirestore/service.go b/mockgcp/mockfirestore/service.go new file mode 100644 index 0000000000..5c0b0ac280 --- /dev/null +++ b/mockgcp/mockfirestore/service.go @@ -0,0 +1,72 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package mockfirestore + +import ( + "context" + "net/http" + + "github.com/GoogleCloudPlatform/k8s-config-connector/mockgcp/common" + "github.com/GoogleCloudPlatform/k8s-config-connector/mockgcp/common/httpmux" + "github.com/GoogleCloudPlatform/k8s-config-connector/mockgcp/common/operations" + "github.com/GoogleCloudPlatform/k8s-config-connector/mockgcp/pkg/storage" + "google.golang.org/grpc" + + pb "github.com/GoogleCloudPlatform/k8s-config-connector/mockgcp/generated/mockgcp/firestore/admin/v1" +) + +// MockService represents a mocked apikeys service. +type MockService struct { + *common.MockEnvironment + storage storage.Storage + operations *operations.Operations +} + +// New creates a MockService. +func New(env *common.MockEnvironment, storage storage.Storage) *MockService { + s := &MockService{ + MockEnvironment: env, + storage: storage, + operations: operations.NewOperationsService(storage), + } + return s +} + +func (s *MockService) ExpectedHosts() []string { + return []string{"firestore.googleapis.com"} +} + +func (s *MockService) Register(grpcServer *grpc.Server) { + pb.RegisterFirestoreAdminServer(grpcServer, &DatabaseService{MockService: s}) +} + +func (s *MockService) NewHTTPMux(ctx context.Context, conn *grpc.ClientConn) (http.Handler, error) { + mux, err := httpmux.NewServeMux(ctx, conn, httpmux.Options{}, + pb.RegisterFirestoreAdminHandler, + s.operations.RegisterOperationsPath("/v1/{prefix=**}/operations/{name}")) + if err != nil { + return nil, err + } + + // Returns slightly non-standard errors + mux.RewriteError = func(ctx context.Context, error *httpmux.ErrorResponse) { + if error.Code == 404 { + error.Errors = nil + error.Message = "Project '${projectId}' or database 'firestoredatabase-${uniqueId}' does not exist." + } + } + + return mux, nil +} diff --git a/pkg/clients/generated/apis/firestore/v1alpha1/doc.go b/pkg/clients/generated/apis/firestore/v1alpha1/doc.go new file mode 100644 index 0000000000..e396930ac6 --- /dev/null +++ b/pkg/clients/generated/apis/firestore/v1alpha1/doc.go @@ -0,0 +1,38 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +// +// ---------------------------------------------------------------------------- +// +// This file is automatically generated by Config Connector and manual +// changes will be clobbered when the file is regenerated. +// +// ---------------------------------------------------------------------------- + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +// Package v1alpha1 contains API Schema definitions for the firestore v1alpha1 API group. +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=package,register +// +k8s:conversion-gen=github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/pkg/apis/firestore +// +k8s:defaulter-gen=TypeMeta +// +groupName=firestore.cnrm.cloud.google.com + +package v1alpha1 diff --git a/pkg/clients/generated/apis/firestore/v1alpha1/firestoredatabase_types.go b/pkg/clients/generated/apis/firestore/v1alpha1/firestoredatabase_types.go new file mode 100644 index 0000000000..03bb3ddfe4 --- /dev/null +++ b/pkg/clients/generated/apis/firestore/v1alpha1/firestoredatabase_types.go @@ -0,0 +1,159 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +// +// ---------------------------------------------------------------------------- +// +// This file is automatically generated by Config Connector and manual +// changes will be clobbered when the file is regenerated. +// +// ---------------------------------------------------------------------------- + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +package v1alpha1 + +import ( + "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/k8s/v1alpha1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +type FirestoreDatabaseSpec struct { + /* The concurrency control mode to use for this database. See https://cloud.google.com/firestore/docs/reference/rest/v1/projects.databases#concurrencymode for more info. */ + // +optional + ConcurrencyMode *string `json:"concurrencyMode,omitempty"` + + /* The location of the database. Available locations are listed at https://cloud.google.com/firestore/docs/locations. */ + // +optional + LocationID *string `json:"locationID,omitempty"` + + /* Whether to enable the PITR feature on this database. See https://cloud.google.com/firestore/docs/reference/rest/v1/projects.databases#pointintimerecoveryenablement for more info. */ + // +optional + PointInTimeRecoveryEnablement *string `json:"pointInTimeRecoveryEnablement,omitempty"` + + /* Immutable. The Project that this resource belongs to. */ + ProjectRef v1alpha1.ResourceRef `json:"projectRef"` + + /* The FirestoreDatabase name. If not given, the metadata.name will be used. */ + // +optional + ResourceID *string `json:"resourceID,omitempty"` +} + +type DatabaseObservedStateStatus struct { + /* Output only. The timestamp at which this database was created. Databases created before 2016 do not populate create_time. */ + // +optional + CreateTime *string `json:"createTime,omitempty"` + + /* Output only. The earliest timestamp at which older versions of the data can + be read from the database. See [version_retention_period] above; this field + is populated with `now - version_retention_period`. + + This value is continuously updated, and becomes stale the moment it is + queried. If you are using this value to recover data, make sure to account + for the time from the moment when the value is queried to the moment when + you initiate the recovery. */ + // +optional + EarliestVersionTime *string `json:"earliestVersionTime,omitempty"` + + /* This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. */ + // +optional + Etag *string `json:"etag,omitempty"` + + /* Output only. The key_prefix for this database. This key_prefix is used, in + combination with the project id ("~") to construct + the application id that is returned from the Cloud Datastore APIs in Google + App Engine first generation runtimes. + + This value may be empty in which case the appid to use for URL-encoded keys + is the project_id (eg: foo instead of v~foo). */ + // +optional + KeyPrefix *string `json:"keyPrefix,omitempty"` + + /* Output only. The system-generated UUID4 for this Database. */ + // +optional + Uid *string `json:"uid,omitempty"` + + /* Output only. The timestamp at which this database was most recently updated. Note this only includes updates to the database resource and not data contained by the database. */ + // +optional + UpdateTime *string `json:"updateTime,omitempty"` + + /* Output only. The period during which past versions of data are retained in + the database. + + Any [read][google.firestore.v1.GetDocumentRequest.read_time] + or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify + a `read_time` within this window, and will read the state of the database + at that time. + + If the PITR feature is enabled, the retention period is 7 days. Otherwise, + the retention period is 1 hour. */ + // +optional + VersionRetentionPeriod *string `json:"versionRetentionPeriod,omitempty"` +} + +type FirestoreDatabaseStatus struct { + /* Conditions represent the latest available observations of the + FirestoreDatabase's current state. */ + Conditions []v1alpha1.Condition `json:"conditions,omitempty"` + /* A unique specifier for the FirestoreDatabase resource in GCP. */ + // +optional + ExternalRef *string `json:"externalRef,omitempty"` + + /* ObservedGeneration is the generation of the resource that was most recently observed by the Config Connector controller. If this is equal to metadata.generation, then that means that the current reported status reflects the most recent desired state of the resource. */ + // +optional + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + + /* ObservedState is the state of the resource as most recently observed in GCP. */ + // +optional + ObservedState *DatabaseObservedStateStatus `json:"observedState,omitempty"` +} + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:resource:categories=gcp,shortName= +// +kubebuilder:subresource:status +// +kubebuilder:metadata:labels="cnrm.cloud.google.com/managed-by-kcc=true";"cnrm.cloud.google.com/system=true" +// +kubebuilder:printcolumn:name="Age",JSONPath=".metadata.creationTimestamp",type="date" +// +kubebuilder:printcolumn:name="Ready",JSONPath=".status.conditions[?(@.type=='Ready')].status",type="string",description="When 'True', the most recent reconcile of the resource succeeded" +// +kubebuilder:printcolumn:name="Status",JSONPath=".status.conditions[?(@.type=='Ready')].reason",type="string",description="The reason for the value in 'Ready'" +// +kubebuilder:printcolumn:name="Status Age",JSONPath=".status.conditions[?(@.type=='Ready')].lastTransitionTime",type="date",description="The last transition time for the value in 'Status'" + +// FirestoreDatabase is the Schema for the firestore API +// +k8s:openapi-gen=true +type FirestoreDatabase struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec FirestoreDatabaseSpec `json:"spec,omitempty"` + Status FirestoreDatabaseStatus `json:"status,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// FirestoreDatabaseList contains a list of FirestoreDatabase +type FirestoreDatabaseList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []FirestoreDatabase `json:"items"` +} + +func init() { + SchemeBuilder.Register(&FirestoreDatabase{}, &FirestoreDatabaseList{}) +} diff --git a/pkg/clients/generated/apis/firestore/v1alpha1/register.go b/pkg/clients/generated/apis/firestore/v1alpha1/register.go new file mode 100644 index 0000000000..b5d3323aa5 --- /dev/null +++ b/pkg/clients/generated/apis/firestore/v1alpha1/register.go @@ -0,0 +1,63 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +// +// ---------------------------------------------------------------------------- +// +// This file is automatically generated by Config Connector and manual +// changes will be clobbered when the file is regenerated. +// +// ---------------------------------------------------------------------------- + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +// Package v1alpha1 contains API Schema definitions for the firestore v1alpha1 API group. +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=package,register +// +k8s:conversion-gen=github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/pkg/apis/firestore +// +k8s:defaulter-gen=TypeMeta +// +groupName=firestore.cnrm.cloud.google.com +package v1alpha1 + +import ( + "reflect" + + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // SchemeGroupVersion is the group version used to register these objects. + SchemeGroupVersion = schema.GroupVersion{Group: "firestore.cnrm.cloud.google.com", Version: "v1alpha1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme. + SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} + + // AddToScheme is a global function that registers this API group & version to a scheme + AddToScheme = SchemeBuilder.AddToScheme + + FirestoreDatabaseGVK = schema.GroupVersionKind{ + Group: SchemeGroupVersion.Group, + Version: SchemeGroupVersion.Version, + Kind: reflect.TypeOf(FirestoreDatabase{}).Name(), + } + + firestoreAPIVersion = SchemeGroupVersion.String() +) diff --git a/pkg/clients/generated/apis/firestore/v1alpha1/zz_generated.deepcopy.go b/pkg/clients/generated/apis/firestore/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 0000000000..b21b1a5233 --- /dev/null +++ b/pkg/clients/generated/apis/firestore/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,215 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + k8sv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/k8s/v1alpha1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DatabaseObservedStateStatus) DeepCopyInto(out *DatabaseObservedStateStatus) { + *out = *in + if in.CreateTime != nil { + in, out := &in.CreateTime, &out.CreateTime + *out = new(string) + **out = **in + } + if in.EarliestVersionTime != nil { + in, out := &in.EarliestVersionTime, &out.EarliestVersionTime + *out = new(string) + **out = **in + } + if in.Etag != nil { + in, out := &in.Etag, &out.Etag + *out = new(string) + **out = **in + } + if in.KeyPrefix != nil { + in, out := &in.KeyPrefix, &out.KeyPrefix + *out = new(string) + **out = **in + } + if in.Uid != nil { + in, out := &in.Uid, &out.Uid + *out = new(string) + **out = **in + } + if in.UpdateTime != nil { + in, out := &in.UpdateTime, &out.UpdateTime + *out = new(string) + **out = **in + } + if in.VersionRetentionPeriod != nil { + in, out := &in.VersionRetentionPeriod, &out.VersionRetentionPeriod + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseObservedStateStatus. +func (in *DatabaseObservedStateStatus) DeepCopy() *DatabaseObservedStateStatus { + if in == nil { + return nil + } + out := new(DatabaseObservedStateStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FirestoreDatabase) DeepCopyInto(out *FirestoreDatabase) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FirestoreDatabase. +func (in *FirestoreDatabase) DeepCopy() *FirestoreDatabase { + if in == nil { + return nil + } + out := new(FirestoreDatabase) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *FirestoreDatabase) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FirestoreDatabaseList) DeepCopyInto(out *FirestoreDatabaseList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]FirestoreDatabase, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FirestoreDatabaseList. +func (in *FirestoreDatabaseList) DeepCopy() *FirestoreDatabaseList { + if in == nil { + return nil + } + out := new(FirestoreDatabaseList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *FirestoreDatabaseList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FirestoreDatabaseSpec) DeepCopyInto(out *FirestoreDatabaseSpec) { + *out = *in + if in.ConcurrencyMode != nil { + in, out := &in.ConcurrencyMode, &out.ConcurrencyMode + *out = new(string) + **out = **in + } + if in.LocationID != nil { + in, out := &in.LocationID, &out.LocationID + *out = new(string) + **out = **in + } + if in.PointInTimeRecoveryEnablement != nil { + in, out := &in.PointInTimeRecoveryEnablement, &out.PointInTimeRecoveryEnablement + *out = new(string) + **out = **in + } + out.ProjectRef = in.ProjectRef + if in.ResourceID != nil { + in, out := &in.ResourceID, &out.ResourceID + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FirestoreDatabaseSpec. +func (in *FirestoreDatabaseSpec) DeepCopy() *FirestoreDatabaseSpec { + if in == nil { + return nil + } + out := new(FirestoreDatabaseSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FirestoreDatabaseStatus) DeepCopyInto(out *FirestoreDatabaseStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]k8sv1alpha1.Condition, len(*in)) + copy(*out, *in) + } + if in.ExternalRef != nil { + in, out := &in.ExternalRef, &out.ExternalRef + *out = new(string) + **out = **in + } + if in.ObservedGeneration != nil { + in, out := &in.ObservedGeneration, &out.ObservedGeneration + *out = new(int64) + **out = **in + } + if in.ObservedState != nil { + in, out := &in.ObservedState, &out.ObservedState + *out = new(DatabaseObservedStateStatus) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FirestoreDatabaseStatus. +func (in *FirestoreDatabaseStatus) DeepCopy() *FirestoreDatabaseStatus { + if in == nil { + return nil + } + out := new(FirestoreDatabaseStatus) + in.DeepCopyInto(out) + return out +} diff --git a/pkg/clients/generated/client/clientset/versioned/clientset.go b/pkg/clients/generated/client/clientset/versioned/clientset.go index 75ba0d03ba..2b53f11d36 100644 --- a/pkg/clients/generated/client/clientset/versioned/clientset.go +++ b/pkg/clients/generated/client/clientset/versioned/clientset.go @@ -87,6 +87,7 @@ import ( firebasedatabasev1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/firebasedatabase/v1alpha1" firebasehostingv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/firebasehosting/v1alpha1" firebasestoragev1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/firebasestorage/v1alpha1" + firestorev1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/firestore/v1alpha1" firestorev1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/firestore/v1beta1" gkebackupv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/gkebackup/v1alpha1" gkehubv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/gkehub/v1beta1" @@ -213,6 +214,7 @@ type Interface interface { FirebasedatabaseV1alpha1() firebasedatabasev1alpha1.FirebasedatabaseV1alpha1Interface FirebasehostingV1alpha1() firebasehostingv1alpha1.FirebasehostingV1alpha1Interface FirebasestorageV1alpha1() firebasestoragev1alpha1.FirebasestorageV1alpha1Interface + FirestoreV1alpha1() firestorev1alpha1.FirestoreV1alpha1Interface FirestoreV1beta1() firestorev1beta1.FirestoreV1beta1Interface GkebackupV1alpha1() gkebackupv1alpha1.GkebackupV1alpha1Interface GkehubV1beta1() gkehubv1beta1.GkehubV1beta1Interface @@ -337,6 +339,7 @@ type Clientset struct { firebasedatabaseV1alpha1 *firebasedatabasev1alpha1.FirebasedatabaseV1alpha1Client firebasehostingV1alpha1 *firebasehostingv1alpha1.FirebasehostingV1alpha1Client firebasestorageV1alpha1 *firebasestoragev1alpha1.FirebasestorageV1alpha1Client + firestoreV1alpha1 *firestorev1alpha1.FirestoreV1alpha1Client firestoreV1beta1 *firestorev1beta1.FirestoreV1beta1Client gkebackupV1alpha1 *gkebackupv1alpha1.GkebackupV1alpha1Client gkehubV1beta1 *gkehubv1beta1.GkehubV1beta1Client @@ -706,6 +709,11 @@ func (c *Clientset) FirebasestorageV1alpha1() firebasestoragev1alpha1.Firebasest return c.firebasestorageV1alpha1 } +// FirestoreV1alpha1 retrieves the FirestoreV1alpha1Client +func (c *Clientset) FirestoreV1alpha1() firestorev1alpha1.FirestoreV1alpha1Interface { + return c.firestoreV1alpha1 +} + // FirestoreV1beta1 retrieves the FirestoreV1beta1Client func (c *Clientset) FirestoreV1beta1() firestorev1beta1.FirestoreV1beta1Interface { return c.firestoreV1beta1 @@ -1283,6 +1291,10 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, if err != nil { return nil, err } + cs.firestoreV1alpha1, err = firestorev1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } cs.firestoreV1beta1, err = firestorev1beta1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err @@ -1594,6 +1606,7 @@ func New(c rest.Interface) *Clientset { cs.firebasedatabaseV1alpha1 = firebasedatabasev1alpha1.New(c) cs.firebasehostingV1alpha1 = firebasehostingv1alpha1.New(c) cs.firebasestorageV1alpha1 = firebasestoragev1alpha1.New(c) + cs.firestoreV1alpha1 = firestorev1alpha1.New(c) cs.firestoreV1beta1 = firestorev1beta1.New(c) cs.gkebackupV1alpha1 = gkebackupv1alpha1.New(c) cs.gkehubV1beta1 = gkehubv1beta1.New(c) diff --git a/pkg/clients/generated/client/clientset/versioned/fake/clientset_generated.go b/pkg/clients/generated/client/clientset/versioned/fake/clientset_generated.go index 3e9365db18..4eddb3fbca 100644 --- a/pkg/clients/generated/client/clientset/versioned/fake/clientset_generated.go +++ b/pkg/clients/generated/client/clientset/versioned/fake/clientset_generated.go @@ -147,6 +147,8 @@ import ( fakefirebasehostingv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/firebasehosting/v1alpha1/fake" firebasestoragev1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/firebasestorage/v1alpha1" fakefirebasestoragev1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/firebasestorage/v1alpha1/fake" + firestorev1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/firestore/v1alpha1" + fakefirestorev1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/firestore/v1alpha1/fake" firestorev1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/firestore/v1beta1" fakefirestorev1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/firestore/v1beta1/fake" gkebackupv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/gkebackup/v1alpha1" @@ -628,6 +630,11 @@ func (c *Clientset) FirebasestorageV1alpha1() firebasestoragev1alpha1.Firebasest return &fakefirebasestoragev1alpha1.FakeFirebasestorageV1alpha1{Fake: &c.Fake} } +// FirestoreV1alpha1 retrieves the FirestoreV1alpha1Client +func (c *Clientset) FirestoreV1alpha1() firestorev1alpha1.FirestoreV1alpha1Interface { + return &fakefirestorev1alpha1.FakeFirestoreV1alpha1{Fake: &c.Fake} +} + // FirestoreV1beta1 retrieves the FirestoreV1beta1Client func (c *Clientset) FirestoreV1beta1() firestorev1beta1.FirestoreV1beta1Interface { return &fakefirestorev1beta1.FakeFirestoreV1beta1{Fake: &c.Fake} diff --git a/pkg/clients/generated/client/clientset/versioned/fake/register.go b/pkg/clients/generated/client/clientset/versioned/fake/register.go index 8d19c1b96c..b94a72cfbe 100644 --- a/pkg/clients/generated/client/clientset/versioned/fake/register.go +++ b/pkg/clients/generated/client/clientset/versioned/fake/register.go @@ -84,6 +84,7 @@ import ( firebasedatabasev1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/firebasedatabase/v1alpha1" firebasehostingv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/firebasehosting/v1alpha1" firebasestoragev1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/firebasestorage/v1alpha1" + firestorev1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/firestore/v1alpha1" firestorev1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/firestore/v1beta1" gkebackupv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/gkebackup/v1alpha1" gkehubv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/gkehub/v1beta1" @@ -214,6 +215,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ firebasedatabasev1alpha1.AddToScheme, firebasehostingv1alpha1.AddToScheme, firebasestoragev1alpha1.AddToScheme, + firestorev1alpha1.AddToScheme, firestorev1beta1.AddToScheme, gkebackupv1alpha1.AddToScheme, gkehubv1beta1.AddToScheme, diff --git a/pkg/clients/generated/client/clientset/versioned/scheme/register.go b/pkg/clients/generated/client/clientset/versioned/scheme/register.go index 81f254fc96..503d62e11a 100644 --- a/pkg/clients/generated/client/clientset/versioned/scheme/register.go +++ b/pkg/clients/generated/client/clientset/versioned/scheme/register.go @@ -84,6 +84,7 @@ import ( firebasedatabasev1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/firebasedatabase/v1alpha1" firebasehostingv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/firebasehosting/v1alpha1" firebasestoragev1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/firebasestorage/v1alpha1" + firestorev1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/firestore/v1alpha1" firestorev1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/firestore/v1beta1" gkebackupv1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/gkebackup/v1alpha1" gkehubv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/gkehub/v1beta1" @@ -214,6 +215,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ firebasedatabasev1alpha1.AddToScheme, firebasehostingv1alpha1.AddToScheme, firebasestoragev1alpha1.AddToScheme, + firestorev1alpha1.AddToScheme, firestorev1beta1.AddToScheme, gkebackupv1alpha1.AddToScheme, gkehubv1beta1.AddToScheme, diff --git a/pkg/clients/generated/client/clientset/versioned/typed/firestore/v1alpha1/doc.go b/pkg/clients/generated/client/clientset/versioned/typed/firestore/v1alpha1/doc.go new file mode 100644 index 0000000000..d3dac805d0 --- /dev/null +++ b/pkg/clients/generated/client/clientset/versioned/typed/firestore/v1alpha1/doc.go @@ -0,0 +1,23 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/pkg/clients/generated/client/clientset/versioned/typed/firestore/v1alpha1/fake/doc.go b/pkg/clients/generated/client/clientset/versioned/typed/firestore/v1alpha1/fake/doc.go new file mode 100644 index 0000000000..dfbe79f9af --- /dev/null +++ b/pkg/clients/generated/client/clientset/versioned/typed/firestore/v1alpha1/fake/doc.go @@ -0,0 +1,23 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/pkg/clients/generated/client/clientset/versioned/typed/firestore/v1alpha1/fake/fake_firestore_client.go b/pkg/clients/generated/client/clientset/versioned/typed/firestore/v1alpha1/fake/fake_firestore_client.go new file mode 100644 index 0000000000..65224cc5a0 --- /dev/null +++ b/pkg/clients/generated/client/clientset/versioned/typed/firestore/v1alpha1/fake/fake_firestore_client.go @@ -0,0 +1,43 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/typed/firestore/v1alpha1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeFirestoreV1alpha1 struct { + *testing.Fake +} + +func (c *FakeFirestoreV1alpha1) FirestoreDatabases(namespace string) v1alpha1.FirestoreDatabaseInterface { + return &FakeFirestoreDatabases{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeFirestoreV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/pkg/clients/generated/client/clientset/versioned/typed/firestore/v1alpha1/fake/fake_firestoredatabase.go b/pkg/clients/generated/client/clientset/versioned/typed/firestore/v1alpha1/fake/fake_firestoredatabase.go new file mode 100644 index 0000000000..bc8335c549 --- /dev/null +++ b/pkg/clients/generated/client/clientset/versioned/typed/firestore/v1alpha1/fake/fake_firestoredatabase.go @@ -0,0 +1,144 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + + v1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/firestore/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeFirestoreDatabases implements FirestoreDatabaseInterface +type FakeFirestoreDatabases struct { + Fake *FakeFirestoreV1alpha1 + ns string +} + +var firestoredatabasesResource = v1alpha1.SchemeGroupVersion.WithResource("firestoredatabases") + +var firestoredatabasesKind = v1alpha1.SchemeGroupVersion.WithKind("FirestoreDatabase") + +// Get takes name of the firestoreDatabase, and returns the corresponding firestoreDatabase object, and an error if there is any. +func (c *FakeFirestoreDatabases) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.FirestoreDatabase, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(firestoredatabasesResource, c.ns, name), &v1alpha1.FirestoreDatabase{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.FirestoreDatabase), err +} + +// List takes label and field selectors, and returns the list of FirestoreDatabases that match those selectors. +func (c *FakeFirestoreDatabases) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.FirestoreDatabaseList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(firestoredatabasesResource, firestoredatabasesKind, c.ns, opts), &v1alpha1.FirestoreDatabaseList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.FirestoreDatabaseList{ListMeta: obj.(*v1alpha1.FirestoreDatabaseList).ListMeta} + for _, item := range obj.(*v1alpha1.FirestoreDatabaseList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested firestoreDatabases. +func (c *FakeFirestoreDatabases) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(firestoredatabasesResource, c.ns, opts)) + +} + +// Create takes the representation of a firestoreDatabase and creates it. Returns the server's representation of the firestoreDatabase, and an error, if there is any. +func (c *FakeFirestoreDatabases) Create(ctx context.Context, firestoreDatabase *v1alpha1.FirestoreDatabase, opts v1.CreateOptions) (result *v1alpha1.FirestoreDatabase, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(firestoredatabasesResource, c.ns, firestoreDatabase), &v1alpha1.FirestoreDatabase{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.FirestoreDatabase), err +} + +// Update takes the representation of a firestoreDatabase and updates it. Returns the server's representation of the firestoreDatabase, and an error, if there is any. +func (c *FakeFirestoreDatabases) Update(ctx context.Context, firestoreDatabase *v1alpha1.FirestoreDatabase, opts v1.UpdateOptions) (result *v1alpha1.FirestoreDatabase, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(firestoredatabasesResource, c.ns, firestoreDatabase), &v1alpha1.FirestoreDatabase{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.FirestoreDatabase), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeFirestoreDatabases) UpdateStatus(ctx context.Context, firestoreDatabase *v1alpha1.FirestoreDatabase, opts v1.UpdateOptions) (*v1alpha1.FirestoreDatabase, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(firestoredatabasesResource, "status", c.ns, firestoreDatabase), &v1alpha1.FirestoreDatabase{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.FirestoreDatabase), err +} + +// Delete takes name of the firestoreDatabase and deletes it. Returns an error if one occurs. +func (c *FakeFirestoreDatabases) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(firestoredatabasesResource, c.ns, name, opts), &v1alpha1.FirestoreDatabase{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeFirestoreDatabases) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(firestoredatabasesResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.FirestoreDatabaseList{}) + return err +} + +// Patch applies the patch and returns the patched firestoreDatabase. +func (c *FakeFirestoreDatabases) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.FirestoreDatabase, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(firestoredatabasesResource, c.ns, name, pt, data, subresources...), &v1alpha1.FirestoreDatabase{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.FirestoreDatabase), err +} diff --git a/pkg/clients/generated/client/clientset/versioned/typed/firestore/v1alpha1/firestore_client.go b/pkg/clients/generated/client/clientset/versioned/typed/firestore/v1alpha1/firestore_client.go new file mode 100644 index 0000000000..ddecd9b0bc --- /dev/null +++ b/pkg/clients/generated/client/clientset/versioned/typed/firestore/v1alpha1/firestore_client.go @@ -0,0 +1,110 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "net/http" + + v1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/firestore/v1alpha1" + "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/scheme" + rest "k8s.io/client-go/rest" +) + +type FirestoreV1alpha1Interface interface { + RESTClient() rest.Interface + FirestoreDatabasesGetter +} + +// FirestoreV1alpha1Client is used to interact with features provided by the firestore.cnrm.cloud.google.com group. +type FirestoreV1alpha1Client struct { + restClient rest.Interface +} + +func (c *FirestoreV1alpha1Client) FirestoreDatabases(namespace string) FirestoreDatabaseInterface { + return newFirestoreDatabases(c, namespace) +} + +// NewForConfig creates a new FirestoreV1alpha1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*FirestoreV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new FirestoreV1alpha1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*FirestoreV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) + if err != nil { + return nil, err + } + return &FirestoreV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new FirestoreV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *FirestoreV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new FirestoreV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *FirestoreV1alpha1Client { + return &FirestoreV1alpha1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1alpha1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FirestoreV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/pkg/clients/generated/client/clientset/versioned/typed/firestore/v1alpha1/firestoredatabase.go b/pkg/clients/generated/client/clientset/versioned/typed/firestore/v1alpha1/firestoredatabase.go new file mode 100644 index 0000000000..30e8f3ac75 --- /dev/null +++ b/pkg/clients/generated/client/clientset/versioned/typed/firestore/v1alpha1/firestoredatabase.go @@ -0,0 +1,198 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + "time" + + v1alpha1 "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/apis/firestore/v1alpha1" + scheme "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/clients/generated/client/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// FirestoreDatabasesGetter has a method to return a FirestoreDatabaseInterface. +// A group's client should implement this interface. +type FirestoreDatabasesGetter interface { + FirestoreDatabases(namespace string) FirestoreDatabaseInterface +} + +// FirestoreDatabaseInterface has methods to work with FirestoreDatabase resources. +type FirestoreDatabaseInterface interface { + Create(ctx context.Context, firestoreDatabase *v1alpha1.FirestoreDatabase, opts v1.CreateOptions) (*v1alpha1.FirestoreDatabase, error) + Update(ctx context.Context, firestoreDatabase *v1alpha1.FirestoreDatabase, opts v1.UpdateOptions) (*v1alpha1.FirestoreDatabase, error) + UpdateStatus(ctx context.Context, firestoreDatabase *v1alpha1.FirestoreDatabase, opts v1.UpdateOptions) (*v1alpha1.FirestoreDatabase, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.FirestoreDatabase, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.FirestoreDatabaseList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.FirestoreDatabase, err error) + FirestoreDatabaseExpansion +} + +// firestoreDatabases implements FirestoreDatabaseInterface +type firestoreDatabases struct { + client rest.Interface + ns string +} + +// newFirestoreDatabases returns a FirestoreDatabases +func newFirestoreDatabases(c *FirestoreV1alpha1Client, namespace string) *firestoreDatabases { + return &firestoreDatabases{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the firestoreDatabase, and returns the corresponding firestoreDatabase object, and an error if there is any. +func (c *firestoreDatabases) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.FirestoreDatabase, err error) { + result = &v1alpha1.FirestoreDatabase{} + err = c.client.Get(). + Namespace(c.ns). + Resource("firestoredatabases"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of FirestoreDatabases that match those selectors. +func (c *firestoreDatabases) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.FirestoreDatabaseList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.FirestoreDatabaseList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("firestoredatabases"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested firestoreDatabases. +func (c *firestoreDatabases) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("firestoredatabases"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a firestoreDatabase and creates it. Returns the server's representation of the firestoreDatabase, and an error, if there is any. +func (c *firestoreDatabases) Create(ctx context.Context, firestoreDatabase *v1alpha1.FirestoreDatabase, opts v1.CreateOptions) (result *v1alpha1.FirestoreDatabase, err error) { + result = &v1alpha1.FirestoreDatabase{} + err = c.client.Post(). + Namespace(c.ns). + Resource("firestoredatabases"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(firestoreDatabase). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a firestoreDatabase and updates it. Returns the server's representation of the firestoreDatabase, and an error, if there is any. +func (c *firestoreDatabases) Update(ctx context.Context, firestoreDatabase *v1alpha1.FirestoreDatabase, opts v1.UpdateOptions) (result *v1alpha1.FirestoreDatabase, err error) { + result = &v1alpha1.FirestoreDatabase{} + err = c.client.Put(). + Namespace(c.ns). + Resource("firestoredatabases"). + Name(firestoreDatabase.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(firestoreDatabase). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *firestoreDatabases) UpdateStatus(ctx context.Context, firestoreDatabase *v1alpha1.FirestoreDatabase, opts v1.UpdateOptions) (result *v1alpha1.FirestoreDatabase, err error) { + result = &v1alpha1.FirestoreDatabase{} + err = c.client.Put(). + Namespace(c.ns). + Resource("firestoredatabases"). + Name(firestoreDatabase.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(firestoreDatabase). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the firestoreDatabase and deletes it. Returns an error if one occurs. +func (c *firestoreDatabases) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("firestoredatabases"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *firestoreDatabases) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("firestoredatabases"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched firestoreDatabase. +func (c *firestoreDatabases) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.FirestoreDatabase, err error) { + result = &v1alpha1.FirestoreDatabase{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("firestoredatabases"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/pkg/clients/generated/client/clientset/versioned/typed/firestore/v1alpha1/generated_expansion.go b/pkg/clients/generated/client/clientset/versioned/typed/firestore/v1alpha1/generated_expansion.go new file mode 100644 index 0000000000..0363c6508c --- /dev/null +++ b/pkg/clients/generated/client/clientset/versioned/typed/firestore/v1alpha1/generated_expansion.go @@ -0,0 +1,24 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// *** DISCLAIMER *** +// Config Connector's go-client for CRDs is currently in ALPHA, which means +// that future versions of the go-client may include breaking changes. +// Please try it out and give us feedback! + +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +type FirestoreDatabaseExpansion interface{} diff --git a/pkg/controller/direct/firestore/client.go b/pkg/controller/direct/firestore/client.go new file mode 100644 index 0000000000..297dd2dd0c --- /dev/null +++ b/pkg/controller/direct/firestore/client.go @@ -0,0 +1,46 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package firestore + +import ( + "context" + "fmt" + + api "cloud.google.com/go/firestore/apiv1/admin" + "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/config" +) + +type gcpClient struct { + config config.ControllerConfig +} + +func newGCPClient(ctx context.Context, config *config.ControllerConfig) (*gcpClient, error) { + gcpClient := &gcpClient{ + config: *config, + } + return gcpClient, nil +} + +func (m *gcpClient) newFirestoreAdminClient(ctx context.Context) (*api.FirestoreAdminClient, error) { + opts, err := m.config.RESTClientOptions() + if err != nil { + return nil, err + } + client, err := api.NewFirestoreAdminRESTClient(ctx, opts...) + if err != nil { + return nil, fmt.Errorf("building firestore admin client: %w", err) + } + return client, err +} diff --git a/pkg/controller/direct/firestore/firestoredatabase_controller.go b/pkg/controller/direct/firestore/firestoredatabase_controller.go new file mode 100644 index 0000000000..50bb12561d --- /dev/null +++ b/pkg/controller/direct/firestore/firestoredatabase_controller.go @@ -0,0 +1,344 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package firestore + +import ( + "context" + "fmt" + "reflect" + + krm "github.com/GoogleCloudPlatform/k8s-config-connector/apis/firestore/v1alpha1" + refs "github.com/GoogleCloudPlatform/k8s-config-connector/apis/refs/v1beta1" + "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/config" + "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/direct" + "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/direct/directbase" + "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/direct/registry" + + gcp "cloud.google.com/go/firestore/apiv1" + apiv1 "cloud.google.com/go/firestore/apiv1/admin" + firestorepb "cloud.google.com/go/firestore/apiv1/admin/adminpb" + "google.golang.org/api/option" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/fieldmaskpb" + + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/klog/v2" + "sigs.k8s.io/controller-runtime/pkg/client" +) + +const ( + ctrlName = "firestoredatabase-controller" + serviceDomain = "//firestore.googleapis.com" +) + +func init() { + registry.RegisterModel(krm.FirestoreDatabaseGVK, NewModel) +} + +func NewModel(ctx context.Context, config *config.ControllerConfig) (directbase.Model, error) { + return &model{config: config}, nil +} + +var _ directbase.Model = &model{} + +type model struct { + config *config.ControllerConfig +} + +func (m *model) client(ctx context.Context) (*gcp.Client, error) { + var opts []option.ClientOption + if m.config.UserAgent != "" { + opts = append(opts, option.WithUserAgent(m.config.UserAgent)) + } + if m.config.HTTPClient != nil { + opts = append(opts, option.WithHTTPClient(m.config.HTTPClient)) + } + if m.config.UserProjectOverride && m.config.BillingProject != "" { + opts = append(opts, option.WithQuotaProject(m.config.BillingProject)) + } + + gcpClient, err := gcp.NewRESTClient(ctx, opts...) + if err != nil { + return nil, fmt.Errorf("building firestore client: %w", err) + } + return gcpClient, err +} + +func (m *model) AdapterForObject(ctx context.Context, reader client.Reader, u *unstructured.Unstructured) (directbase.Adapter, error) { + gcpClient, err := newGCPClient(ctx, m.config) + if err != nil { + return nil, err + } + firestoreAdminClient, err := gcpClient.newFirestoreAdminClient(ctx) + if err != nil { + return nil, err + } + + obj := &krm.FirestoreDatabase{} + if err := runtime.DefaultUnstructuredConverter.FromUnstructured(u.Object, &obj); err != nil { + return nil, fmt.Errorf("error converting to %T: %w", obj, err) + } + + // Get Resource ID + resourceID := direct.ValueOf(obj.Spec.ResourceID) + if resourceID == "" { + resourceID = obj.GetName() + } + if resourceID == "" { + return nil, fmt.Errorf("cannot resolve resource ID") + } + + // Get Project ID + projectRef, err := refs.ResolveProject(ctx, reader, obj, &obj.Spec.ProjectRef) + if err != nil { + return nil, err + } + projectID := projectRef.ProjectID + if projectID == "" { + return nil, fmt.Errorf("cannot resolve project") + } + + var id *FirestoreDatabaseIdentity + externalRef := direct.ValueOf(obj.Status.ExternalRef) + if externalRef == "" { + id = BuildID(projectID, resourceID) + } else { + id, err = asID(externalRef) + if err != nil { + return nil, err + } + + if id.project != projectID { + return nil, fmt.Errorf("FirestoreDatabase %s/%s has spec.projectRef changed, expect %s, got %s", + u.GetNamespace(), u.GetName(), id.project, projectID) + } + if id.firestoredatabase != resourceID { + return nil, fmt.Errorf("FirestoreDatabase %s/%s has metadata.name or spec.resourceID changed, expect %s, got %s", + u.GetNamespace(), u.GetName(), id.firestoredatabase, resourceID) + } + } + + return &Adapter{ + id: id, + firestoreAdminClient: firestoreAdminClient, + desired: obj, + }, nil +} + +func (m *model) AdapterForURL(ctx context.Context, url string) (directbase.Adapter, error) { + // TODO: Support URLs + return nil, nil +} + +type Adapter struct { + id *FirestoreDatabaseIdentity + firestoreAdminClient *apiv1.FirestoreAdminClient + desired *krm.FirestoreDatabase + actual *firestorepb.Database +} + +var _ directbase.Adapter = &Adapter{} + +func (a *Adapter) Find(ctx context.Context) (bool, error) { + log := klog.FromContext(ctx).WithName(ctrlName) + log.V(2).Info("getting FirestoreDatabase", "name", a.id.FullyQualifiedName()) + + if a.id == nil { + return false, nil + } + + req := &firestorepb.GetDatabaseRequest{Name: a.id.FullyQualifiedName()} + firestoredatabasepb, err := a.firestoreAdminClient.GetDatabase(ctx, req) + if err != nil { + if direct.IsNotFound(err) { + return false, nil + } + return false, fmt.Errorf("getting FirestoreDatabase %q: %w", a.id.FullyQualifiedName(), err) + } + + a.actual = firestoredatabasepb + return true, nil +} + +func (a *Adapter) Create(ctx context.Context, createOp *directbase.CreateOperation) error { + u := createOp.GetUnstructured() + + log := klog.FromContext(ctx).WithName(ctrlName) + log.V(2).Info("creating FirestoreDatabase", "name", a.id.FullyQualifiedName()) + mapCtx := &direct.MapContext{} + + projectID := a.id.project + if projectID == "" { + return fmt.Errorf("project is empty") + } + if a.id.firestoredatabase == "" { + return fmt.Errorf("resourceID is empty") + } + + desired := a.desired.DeepCopy() + resource := FirestoreDatabaseSpec_ToProto(mapCtx, &desired.Spec) + if mapCtx.Err() != nil { + return mapCtx.Err() + } + resource.Name = a.id.FullyQualifiedName() + + req := &firestorepb.CreateDatabaseRequest{ + Parent: a.id.Parent(), + Database: resource, + DatabaseId: a.id.firestoredatabase, + } + op, err := a.firestoreAdminClient.CreateDatabase(ctx, req) + if err != nil { + return fmt.Errorf("creating FirestoreDatabase %s: %w", a.id.FullyQualifiedName(), err) + } + + created, err := op.Wait(ctx) + if err != nil { + return fmt.Errorf("FirestoreDatabase %s waiting creation: %w", a.id.FullyQualifiedName(), err) + } + log.V(2).Info("successfully created FirestoreDatabase", "name", a.id.FullyQualifiedName()) + + status := &krm.FirestoreDatabaseStatus{} + status.ObservedState = FirestoreDatabaseObservedState_FromProto(mapCtx, created) + if mapCtx.Err() != nil { + return mapCtx.Err() + } + status.ExternalRef = a.id.AsExternalRef() + return setStatus(u, status) +} + +func (a *Adapter) Update(ctx context.Context, updateOp *directbase.UpdateOperation) error { + u := updateOp.GetUnstructured() + + log := klog.FromContext(ctx).WithName(ctrlName) + log.V(2).Info("updating FirestoreDatabase", "name", a.id.FullyQualifiedName()) + mapCtx := &direct.MapContext{} + + desired := a.desired.DeepCopy() + resource := FirestoreDatabaseSpec_ToProto(mapCtx, &desired.Spec) + if mapCtx.Err() != nil { + return mapCtx.Err() + } + + newDb := proto.Clone(a.actual).(*firestorepb.Database) + + updateMask := &fieldmaskpb.FieldMask{} + if !reflect.DeepEqual(resource.ConcurrencyMode, a.actual.ConcurrencyMode) { + newDb.ConcurrencyMode = resource.ConcurrencyMode + updateMask.Paths = append(updateMask.Paths, "concurrency_mode") + } + if !reflect.DeepEqual(resource.PointInTimeRecoveryEnablement, a.actual.PointInTimeRecoveryEnablement) { + newDb.PointInTimeRecoveryEnablement = resource.PointInTimeRecoveryEnablement + updateMask.Paths = append(updateMask.Paths, "point_in_time_recovery_enablement") + } + + if len(updateMask.Paths) == 0 { + return nil + } + + req := &firestorepb.UpdateDatabaseRequest{ + Database: newDb, + UpdateMask: updateMask, + } + op, err := a.firestoreAdminClient.UpdateDatabase(ctx, req) + if err != nil { + return fmt.Errorf("updating FirestoreDatabase %q: %w", a.id.FullyQualifiedName(), err) + } + + updated, err := op.Wait(ctx) + if err != nil { + return fmt.Errorf("FirestoreDatabase %s waiting update: %w", a.id.FullyQualifiedName(), err) + } + log.V(2).Info("successfully updated FirestoreDatabase", "name", a.id.FullyQualifiedName()) + + status := &krm.FirestoreDatabaseStatus{} + status.ObservedState = FirestoreDatabaseObservedState_FromProto(mapCtx, updated) + if mapCtx.Err() != nil { + return mapCtx.Err() + } + return setStatus(u, status) +} + +func (a *Adapter) Export(ctx context.Context) (*unstructured.Unstructured, error) { + if a.actual == nil { + return nil, fmt.Errorf("FirestoreDatabase %q not found", a.id.FullyQualifiedName()) + } + + mapCtx := &direct.MapContext{} + dbSpec := FirestoreDatabaseSpec_FromProto(mapCtx, a.actual) + + db := &krm.FirestoreDatabase{ + Spec: *dbSpec, + } + obj, err := runtime.DefaultUnstructuredConverter.ToUnstructured(db) + if err != nil { + return nil, fmt.Errorf("converting FirestoreDatabase to unstructured failed: %w", err) + } + + u := &unstructured.Unstructured{ + Object: obj, + } + u.SetName(a.id.firestoredatabase) + u.SetGroupVersionKind(krm.FirestoreDatabaseGVK) + + return u, nil +} + +// Delete implements the Adapter interface. +func (a *Adapter) Delete(ctx context.Context, deleteOp *directbase.DeleteOperation) (bool, error) { + log := klog.FromContext(ctx).WithName(ctrlName) + log.V(2).Info("deleting FirestoreDatabase", "name", a.id.FullyQualifiedName()) + + if a.id.firestoredatabase == "" { + return false, nil + } + if a.actual == nil { + return false, fmt.Errorf("FirestoreDatabase %s not found in GCP", a.id.FullyQualifiedName()) + } + req := &firestorepb.DeleteDatabaseRequest{ + Name: a.id.FullyQualifiedName(), + Etag: a.actual.Etag, + } + op, err := a.firestoreAdminClient.DeleteDatabase(ctx, req) + if err != nil { + return false, fmt.Errorf("deleting FirestoreDatabase %s: %w", a.id.FullyQualifiedName(), err) + } + log.V(2).Info("successfully deleted FirestoreDatabase", "name", a.id.FullyQualifiedName()) + + _, err = op.Wait(ctx) + if err != nil { + return false, fmt.Errorf("waiting delete FirestoreDatabase %s: %w", a.id.FullyQualifiedName(), err) + } + return true, nil +} + +func setStatus(u *unstructured.Unstructured, typedStatus any) error { + status, err := runtime.DefaultUnstructuredConverter.ToUnstructured(typedStatus) + if err != nil { + return fmt.Errorf("error converting status to unstructured: %w", err) + } + + old, _, _ := unstructured.NestedMap(u.Object, "status") + if old != nil { + status["conditions"] = old["conditions"] + status["observedGeneration"] = old["observedGeneration"] + status["externalRef"] = old["externalRef"] + } + + u.Object["status"] = status + + return nil +} diff --git a/pkg/controller/direct/firestore/firestoredatabase_externalresource.go b/pkg/controller/direct/firestore/firestoredatabase_externalresource.go new file mode 100644 index 0000000000..02ed463b62 --- /dev/null +++ b/pkg/controller/direct/firestore/firestoredatabase_externalresource.go @@ -0,0 +1,68 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package firestore + +import ( + "fmt" + "strings" +) + +type FirestoreDatabaseIdentity struct { + project string + location string + firestoredatabase string +} + +// Parent builds a FirestoreDatabase parent +func (c *FirestoreDatabaseIdentity) Parent() string { + return "projects/" + c.project +} + +// FullyQualifiedName builds a FirestoreDatabase resource fully qualified name +func (c *FirestoreDatabaseIdentity) FullyQualifiedName() string { + return c.Parent() + "/databases/" + c.firestoredatabase +} + +// AsExternalRef builds a externalRef from a FirestoreDatabase +func (c *FirestoreDatabaseIdentity) AsExternalRef() *string { + e := serviceDomain + "/" + c.FullyQualifiedName() + return &e +} + +// asID builds a FirestoreDatabaseIdentity from a external reference +func asID(externalRef string) (*FirestoreDatabaseIdentity, error) { + if !strings.HasPrefix(externalRef, serviceDomain) { + return nil, fmt.Errorf("externalRef should have prefix %s, got %s", serviceDomain, externalRef) + } + path := strings.TrimPrefix(externalRef, serviceDomain+"/") + tokens := strings.Split(path, "/") + + if len(tokens) != 4 || tokens[0] != "projects" || tokens[2] != "databases" { + return nil, fmt.Errorf("externalRef should be %s/projects//databases/, got %s", + serviceDomain, externalRef) + } + return &FirestoreDatabaseIdentity{ + project: tokens[1], + firestoredatabase: tokens[3], + }, nil +} + +// BuildID builds a unique identifier FirestoreDatabaseIdentity from resource components +func BuildID(project, firestoredatabase string) *FirestoreDatabaseIdentity { + return &FirestoreDatabaseIdentity{ + project: project, + firestoredatabase: firestoredatabase, + } +} diff --git a/pkg/controller/direct/firestore/firestoredatabase_mappings.go b/pkg/controller/direct/firestore/firestoredatabase_mappings.go new file mode 100644 index 0000000000..4414f99b59 --- /dev/null +++ b/pkg/controller/direct/firestore/firestoredatabase_mappings.go @@ -0,0 +1,61 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package firestore + +import ( + pb "cloud.google.com/go/firestore/apiv1/admin/adminpb" + krm "github.com/GoogleCloudPlatform/k8s-config-connector/apis/firestore/v1alpha1" + "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/direct" +) + +func FirestoreDatabaseObservedState_FromProto(mapCtx *direct.MapContext, in *pb.Database) *krm.FirestoreDatabaseObservedState { + if in == nil { + return nil + } + out := &krm.FirestoreDatabaseObservedState{} + out.Uid = direct.LazyPtr(in.GetUid()) + out.CreateTime = direct.ToOpenAPIDateTime(in.GetCreateTime()) + out.UpdateTime = direct.ToOpenAPIDateTime(in.GetUpdateTime()) + out.VersionRetentionPeriod = direct.Duration_FromProto(mapCtx, in.GetVersionRetentionPeriod()) + out.EarliestVersionTime = direct.ToOpenAPIDateTime(in.GetEarliestVersionTime()) + out.KeyPrefix = direct.LazyPtr(in.GetKeyPrefix()) + out.Etag = direct.LazyPtr(in.GetEtag()) + return out +} + +func FirestoreDatabaseSpec_FromProto(mapCtx *direct.MapContext, in *pb.Database) *krm.FirestoreDatabaseSpec { + if in == nil { + return nil + } + out := &krm.FirestoreDatabaseSpec{} + out.LocationID = direct.LazyPtr(in.GetLocationId()) + out.ConcurrencyMode = direct.Enum_FromProto(mapCtx, in.GetConcurrencyMode()) + out.PointInTimeRecoveryEnablement = direct.Enum_FromProto(mapCtx, in.GetPointInTimeRecoveryEnablement()) + return out +} + +func FirestoreDatabaseSpec_ToProto(mapCtx *direct.MapContext, in *krm.FirestoreDatabaseSpec) *pb.Database { + if in == nil { + return nil + } + out := &pb.Database{} + out.LocationId = direct.ValueOf(in.LocationID) + out.Type = pb.Database_FIRESTORE_NATIVE + out.ConcurrencyMode = direct.Enum_ToProto[pb.Database_ConcurrencyMode](mapCtx, in.ConcurrencyMode) + out.PointInTimeRecoveryEnablement = direct.Enum_ToProto[pb.Database_PointInTimeRecoveryEnablement](mapCtx, in.PointInTimeRecoveryEnablement) + out.AppEngineIntegrationMode = pb.Database_DISABLED + out.DeleteProtectionState = pb.Database_DELETE_PROTECTION_DISABLED + return out +} diff --git a/pkg/controller/direct/firestore/mapper.generated.go b/pkg/controller/direct/firestore/mapper.generated.go new file mode 100644 index 0000000000..2041bf6c36 --- /dev/null +++ b/pkg/controller/direct/firestore/mapper.generated.go @@ -0,0 +1,44 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package firestore + +/* +import ( + pb "cloud.google.com/go/firestore/apiv1/admin/adminpb" + krm "github.com/GoogleCloudPlatform/k8s-config-connector/apis/firestore/v1alpha1" + "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/direct" +) +func FirestoreDatabaseObservedState_ToProto(mapCtx *direct.MapContext, in *krm.FirestoreDatabaseObservedState) *pb.Database { + if in == nil { + return nil + } + out := &pb.Database{} + // MISSING: Name + out.Uid = direct.ValueOf(in.Uid) + out.CreateTime = Database_CreateTime_ToProto(mapCtx, in.CreateTime) + out.UpdateTime = Database_UpdateTime_ToProto(mapCtx, in.UpdateTime) + // MISSING: LocationID + // MISSING: Type + // MISSING: ConcurrencyMode + out.VersionRetentionPeriod = Database_VersionRetentionPeriod_ToProto(mapCtx, in.VersionRetentionPeriod) + out.EarliestVersionTime = Database_EarliestVersionTime_ToProto(mapCtx, in.EarliestVersionTime) + // MISSING: PointInTimeRecoveryEnablement + // MISSING: AppEngineIntegrationMode + out.KeyPrefix = direct.ValueOf(in.KeyPrefix) + // MISSING: DeleteProtectionState + out.Etag = direct.ValueOf(in.Etag) + return out +} +*/ diff --git a/pkg/controller/direct/maputils.go b/pkg/controller/direct/maputils.go index 09fa151948..448717279d 100644 --- a/pkg/controller/direct/maputils.go +++ b/pkg/controller/direct/maputils.go @@ -219,17 +219,25 @@ func Duration_FromProto(mapCtx *MapContext, in *durationpb.Duration) *string { return nil } + s := in.Seconds + n := in.Nanos + + if in.Nanos/1e9 > 0 { + s += int64(in.Nanos / 1e9) + n = in.Nanos % 1e9 + } + // We want to report the duration without truncation (do don't want to map via float64) - s := strconv.FormatInt(in.Seconds, 10) - if in.Nanos != 0 { - nanos := strconv.FormatInt(int64(in.Nanos), 10) + sStr := strconv.FormatInt(s, 10) + if n != 0 { + nanos := strconv.FormatInt(int64(n), 10) pad := 9 - len(nanos) nanos = strings.Repeat("0", pad) + nanos nanos = strings.TrimRight(nanos, "0") - s += "." + nanos + sStr += "." + nanos } - s += "s" - return &s + sStr += "s" + return &sStr } func SecondsString_FromProto(mapCtx *MapContext, in *durationpb.Duration) *string { diff --git a/pkg/controller/direct/register/register.go b/pkg/controller/direct/register/register.go index e18d2ae624..30eea23057 100644 --- a/pkg/controller/direct/register/register.go +++ b/pkg/controller/direct/register/register.go @@ -21,6 +21,7 @@ import ( _ "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/direct/compute" _ "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/direct/dataflow" _ "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/direct/dataform" + _ "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/direct/firestore" _ "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/direct/gkehub" _ "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/direct/logging" _ "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/direct/monitoring" diff --git a/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-full/_generated_object_firestoredatabase-full.golden.yaml b/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-full/_generated_object_firestoredatabase-full.golden.yaml new file mode 100644 index 0000000000..a0076d49db --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-full/_generated_object_firestoredatabase-full.golden.yaml @@ -0,0 +1,34 @@ +apiVersion: firestore.cnrm.cloud.google.com/v1alpha1 +kind: FirestoreDatabase +metadata: + finalizers: + - cnrm.cloud.google.com/finalizer + - cnrm.cloud.google.com/deletion-defender + generation: 2 + labels: + cnrm-test: "true" + name: firestoredatabase-full-${uniqueId} + namespace: ${uniqueId} +spec: + concurrencyMode: OPTIMISTIC + locationID: us-west2 + pointInTimeRecoveryEnablement: POINT_IN_TIME_RECOVERY_ENABLED + projectRef: + external: ${projectId} + resourceID: firestoredatabase-${uniqueId} +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + externalRef: //firestore.googleapis.com/projects/${projectId}/databases/firestoredatabase-${uniqueId} + observedGeneration: 2 + observedState: + createTime: "1970-01-01T00:00:00Z" + earliestVersionTime: "1970-01-01T00:00:00Z" + etag: abcdef123456 + uid: 0123456789abcdef + updateTime: "1970-01-01T00:00:00Z" + versionRetentionPeriod: 604800s diff --git a/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-full/_http.log b/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-full/_http.log new file mode 100644 index 0000000000..c2fd578fa0 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-full/_http.log @@ -0,0 +1,353 @@ +GET https://firestore.googleapis.com/v1/projects/${projectId}/databases/firestoredatabase-${uniqueId}?%24alt=json%3Benum-encoding%3Dint +Content-Type: application/json +User-Agent: kcc/controller-manager +x-goog-request-params: name=projects%2F${projectId}%2Fdatabases%2Ffirestoredatabase-${uniqueId} + +404 Not Found +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "error": { + "code": 404, + "message": "Project '${projectId}' or database 'firestoredatabase-${uniqueId}' does not exist.", + "status": "NOT_FOUND" + } +} + +--- + +POST https://firestore.googleapis.com/v1/projects/${projectId}/databases?%24alt=json%3Benum-encoding%3Dint&databaseId=firestoredatabase-${uniqueId} +Content-Type: application/json +User-Agent: kcc/controller-manager +x-goog-request-params: parent=projects%2F${projectId} + +{ + "appEngineIntegrationMode": 2, + "concurrencyMode": 2, + "deleteProtectionState": 1, + "locationId": "us-west2", + "name": "projects/${projectId}/databases/firestoredatabase-${uniqueId}", + "pointInTimeRecoveryEnablement": 2, + "type": 1 +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "metadata": { + "@type": "type.googleapis.com/google.firestore.admin.v1.CreateDatabaseMetadata" + }, + "name": "projects/${projectId}/databases/firestoredatabase-${uniqueId}/operations/${operationID}", + "response": { + "@type": "type.googleapis.com/mockgcp.firestore.admin.v1.Database", + "appEngineIntegrationMode": 2, + "concurrencyMode": 2, + "createTime": "2024-04-01T12:34:56.123456Z", + "deleteProtectionState": 1, + "earliestVersionTime": "2024-04-01T12:34:56.123456Z", + "etag": "abcdef0123A=", + "locationId": "us-west2", + "name": "projects/${projectId}/databases/firestoredatabase-${uniqueId}", + "pointInTimeRecoveryEnablement": 2, + "type": 1, + "uid": "111111111111111111111", + "updateTime": "2024-04-01T12:34:56.123456Z", + "versionRetentionPeriod": "3600s" + } +} + +--- + +GET https://firestore.googleapis.com/v1/projects/${projectId}/databases/firestoredatabase-${uniqueId}/operations/${operationID} +Content-Type: application/json +User-Agent: kcc/controller-manager +x-goog-request-params: name=projects%2F${projectId}%2Fdatabases%2Ffirestoredatabase-${uniqueId}%2Foperations%2F${operationID} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "done": true, + "metadata": { + "@type": "type.googleapis.com/google.firestore.admin.v1.CreateDatabaseMetadata" + }, + "name": "projects/${projectId}/databases/firestoredatabase-${uniqueId}/operations/${operationID}", + "response": { + "@type": "type.googleapis.com/google.firestore.admin.v1.Database", + "appEngineIntegrationMode": "DISABLED", + "concurrencyMode": "PESSIMISTIC", + "createTime": "2024-04-01T12:34:56.123456Z", + "deleteProtectionState": "DELETE_PROTECTION_DISABLED", + "earliestVersionTime": "2024-04-01T12:34:56.123456Z", + "etag": "abcdef0123A=", + "locationId": "us-west2", + "name": "projects/${projectId}/databases/firestoredatabase-${uniqueId}", + "pointInTimeRecoveryEnablement": "POINT_IN_TIME_RECOVERY_DISABLED", + "type": "FIRESTORE_NATIVE", + "uid": "111111111111111111111", + "updateTime": "2024-04-01T12:34:56.123456Z", + "versionRetentionPeriod": "3600s" + } +} + +--- + +GET https://firestore.googleapis.com/v1/projects/${projectId}/databases/firestoredatabase-${uniqueId}?%24alt=json%3Benum-encoding%3Dint +Content-Type: application/json +User-Agent: kcc/controller-manager +x-goog-request-params: name=projects%2F${projectId}%2Fdatabases%2Ffirestoredatabase-${uniqueId} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "appEngineIntegrationMode": 2, + "concurrencyMode": 2, + "createTime": "2024-04-01T12:34:56.123456Z", + "deleteProtectionState": 1, + "earliestVersionTime": "2024-04-01T12:34:56.123456Z", + "etag": "abcdef0123A=", + "locationId": "us-west2", + "name": "projects/${projectId}/databases/firestoredatabase-${uniqueId}", + "pointInTimeRecoveryEnablement": 2, + "type": 1, + "uid": "111111111111111111111", + "updateTime": "2024-04-01T12:34:56.123456Z", + "versionRetentionPeriod": "3600s" +} + +--- + +PATCH https://firestore.googleapis.com/v1/projects/${projectId}/databases/firestoredatabase-${uniqueId}?%24alt=json%3Benum-encoding%3Dint&updateMask=concurrencyMode%2CpointInTimeRecoveryEnablement +Content-Type: application/json +User-Agent: kcc/controller-manager +x-goog-request-params: database.name=projects%2F${projectId}%2Fdatabases%2Ffirestoredatabase-${uniqueId} + +{ + "appEngineIntegrationMode": 2, + "concurrencyMode": 1, + "createTime": "2024-04-01T12:34:56.123456Z", + "deleteProtectionState": 1, + "earliestVersionTime": "2024-04-01T12:34:56.123456Z", + "etag": "abcdef0123A=", + "locationId": "us-west2", + "name": "projects/${projectId}/databases/firestoredatabase-${uniqueId}", + "pointInTimeRecoveryEnablement": 1, + "type": 1, + "uid": "111111111111111111111", + "updateTime": "2024-04-01T12:34:56.123456Z", + "versionRetentionPeriod": "3600s" +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "metadata": { + "@type": "type.googleapis.com/google.firestore.admin.v1.UpdateDatabaseMetadata" + }, + "name": "projects/${projectId}/databases/firestoredatabase-${uniqueId}/operations/${operationID}", + "response": { + "@type": "type.googleapis.com/mockgcp.firestore.admin.v1.Database", + "appEngineIntegrationMode": 2, + "concurrencyMode": 1, + "createTime": "2024-04-01T12:34:56.123456Z", + "deleteProtectionState": 1, + "earliestVersionTime": "2024-04-01T12:34:56.123456Z", + "etag": "abcdef0123A=", + "locationId": "us-west2", + "name": "projects/${projectId}/databases/firestoredatabase-${uniqueId}", + "pointInTimeRecoveryEnablement": 1, + "type": 1, + "uid": "111111111111111111111", + "updateTime": "2024-04-01T12:34:56.123456Z", + "versionRetentionPeriod": "604800s" + } +} + +--- + +GET https://firestore.googleapis.com/v1/projects/${projectId}/databases/firestoredatabase-${uniqueId}/operations/${operationID} +Content-Type: application/json +User-Agent: kcc/controller-manager +x-goog-request-params: name=projects%2F${projectId}%2Fdatabases%2Ffirestoredatabase-${uniqueId}%2Foperations%2F${operationID} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "done": true, + "metadata": { + "@type": "type.googleapis.com/google.firestore.admin.v1.UpdateDatabaseMetadata" + }, + "name": "projects/${projectId}/databases/firestoredatabase-${uniqueId}/operations/${operationID}", + "response": { + "@type": "type.googleapis.com/google.firestore.admin.v1.Database", + "appEngineIntegrationMode": "DISABLED", + "concurrencyMode": "OPTIMISTIC", + "createTime": "2024-04-01T12:34:56.123456Z", + "deleteProtectionState": "DELETE_PROTECTION_DISABLED", + "earliestVersionTime": "2024-04-01T12:34:56.123456Z", + "etag": "abcdef0123A=", + "locationId": "us-west2", + "name": "projects/${projectId}/databases/firestoredatabase-${uniqueId}", + "pointInTimeRecoveryEnablement": "POINT_IN_TIME_RECOVERY_ENABLED", + "type": "FIRESTORE_NATIVE", + "uid": "111111111111111111111", + "updateTime": "2024-04-01T12:34:56.123456Z", + "versionRetentionPeriod": "604800s" + } +} + +--- + +GET https://firestore.googleapis.com/v1/projects/${projectId}/databases/firestoredatabase-${uniqueId}?%24alt=json%3Benum-encoding%3Dint +Content-Type: application/json +User-Agent: kcc/controller-manager +x-goog-request-params: name=projects%2F${projectId}%2Fdatabases%2Ffirestoredatabase-${uniqueId} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "appEngineIntegrationMode": 2, + "concurrencyMode": 1, + "createTime": "2024-04-01T12:34:56.123456Z", + "deleteProtectionState": 1, + "earliestVersionTime": "2024-04-01T12:34:56.123456Z", + "etag": "abcdef0123A=", + "locationId": "us-west2", + "name": "projects/${projectId}/databases/firestoredatabase-${uniqueId}", + "pointInTimeRecoveryEnablement": 1, + "type": 1, + "uid": "111111111111111111111", + "updateTime": "2024-04-01T12:34:56.123456Z", + "versionRetentionPeriod": "604800s" +} + +--- + +DELETE https://firestore.googleapis.com/v1/projects/${projectId}/databases/firestoredatabase-${uniqueId}?%24alt=json%3Benum-encoding%3Dint&etag=abcdef0123A +Content-Type: application/json +User-Agent: kcc/controller-manager +x-goog-request-params: name=projects%2F${projectId}%2Fdatabases%2Ffirestoredatabase-${uniqueId} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "metadata": { + "@type": "type.googleapis.com/google.firestore.admin.v1.DeleteDatabaseMetadata" + }, + "name": "projects/${projectId}/databases/firestoredatabase-${uniqueId}/operations/${operationID}", + "response": { + "@type": "type.googleapis.com/mockgcp.firestore.admin.v1.Database", + "appEngineIntegrationMode": 2, + "concurrencyMode": 1, + "createTime": "2024-04-01T12:34:56.123456Z", + "deleteProtectionState": 1, + "earliestVersionTime": "2024-04-01T12:34:56.123456Z", + "etag": "abcdef0123A=", + "locationId": "us-west2", + "name": "projects/${projectId}/databases/firestoredatabase-${uniqueId}", + "pointInTimeRecoveryEnablement": 1, + "type": 1, + "uid": "111111111111111111111", + "updateTime": "2024-04-01T12:34:56.123456Z", + "versionRetentionPeriod": "604800s" + } +} + +--- + +GET https://firestore.googleapis.com/v1/projects/${projectId}/databases/firestoredatabase-${uniqueId}/operations/${operationID} +Content-Type: application/json +User-Agent: kcc/controller-manager +x-goog-request-params: name=projects%2F${projectId}%2Fdatabases%2Ffirestoredatabase-${uniqueId}%2Foperations%2F${operationID} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "done": true, + "metadata": { + "@type": "type.googleapis.com/google.firestore.admin.v1.DeleteDatabaseMetadata" + }, + "name": "projects/${projectId}/databases/firestoredatabase-${uniqueId}/operations/${operationID}", + "response": { + "@type": "type.googleapis.com/google.firestore.admin.v1.Database" + } +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-full/create.yaml b/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-full/create.yaml new file mode 100644 index 0000000000..38828c0d70 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-full/create.yaml @@ -0,0 +1,25 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: firestore.cnrm.cloud.google.com/v1alpha1 +kind: FirestoreDatabase +metadata: + name: firestoredatabase-full-${uniqueId} +spec: + projectRef: + external: ${projectId} + resourceID: firestoredatabase-${uniqueId} + locationID: us-west2 + concurrencyMode: PESSIMISTIC + pointInTimeRecoveryEnablement: POINT_IN_TIME_RECOVERY_DISABLED \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-full/update.yaml b/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-full/update.yaml new file mode 100644 index 0000000000..b7590ca7e2 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-full/update.yaml @@ -0,0 +1,25 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: firestore.cnrm.cloud.google.com/v1alpha1 +kind: FirestoreDatabase +metadata: + name: firestoredatabase-full-${uniqueId} +spec: + projectRef: + external: ${projectId} + resourceID: firestoredatabase-${uniqueId} + locationID: us-west2 + concurrencyMode: OPTIMISTIC + pointInTimeRecoveryEnablement: POINT_IN_TIME_RECOVERY_ENABLED \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-minimal/_generated_object_firestoredatabase-minimal.golden.yaml b/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-minimal/_generated_object_firestoredatabase-minimal.golden.yaml new file mode 100644 index 0000000000..07e497d41d --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-minimal/_generated_object_firestoredatabase-minimal.golden.yaml @@ -0,0 +1,32 @@ +apiVersion: firestore.cnrm.cloud.google.com/v1alpha1 +kind: FirestoreDatabase +metadata: + finalizers: + - cnrm.cloud.google.com/finalizer + - cnrm.cloud.google.com/deletion-defender + generation: 1 + labels: + cnrm-test: "true" + name: firestoredatabase-minimal-${uniqueId} + namespace: ${uniqueId} +spec: + locationID: us-west2 + projectRef: + external: ${projectId} + resourceID: firestoredatabase-${uniqueId} +status: + conditions: + - lastTransitionTime: "1970-01-01T00:00:00Z" + message: The resource is up to date + reason: UpToDate + status: "True" + type: Ready + externalRef: //firestore.googleapis.com/projects/${projectId}/databases/firestoredatabase-${uniqueId} + observedGeneration: 1 + observedState: + createTime: "1970-01-01T00:00:00Z" + earliestVersionTime: "1970-01-01T00:00:00Z" + etag: abcdef123456 + uid: 0123456789abcdef + updateTime: "1970-01-01T00:00:00Z" + versionRetentionPeriod: 3600s diff --git a/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-minimal/_http.log b/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-minimal/_http.log new file mode 100644 index 0000000000..1667fb745f --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-minimal/_http.log @@ -0,0 +1,218 @@ +GET https://firestore.googleapis.com/v1/projects/${projectId}/databases/firestoredatabase-${uniqueId}?%24alt=json%3Benum-encoding%3Dint +Content-Type: application/json +User-Agent: kcc/controller-manager +x-goog-request-params: name=projects%2F${projectId}%2Fdatabases%2Ffirestoredatabase-${uniqueId} + +404 Not Found +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "error": { + "code": 404, + "message": "Project '${projectId}' or database 'firestoredatabase-${uniqueId}' does not exist.", + "status": "NOT_FOUND" + } +} + +--- + +POST https://firestore.googleapis.com/v1/projects/${projectId}/databases?%24alt=json%3Benum-encoding%3Dint&databaseId=firestoredatabase-${uniqueId} +Content-Type: application/json +User-Agent: kcc/controller-manager +x-goog-request-params: parent=projects%2F${projectId} + +{ + "appEngineIntegrationMode": 2, + "deleteProtectionState": 1, + "locationId": "us-west2", + "name": "projects/${projectId}/databases/firestoredatabase-${uniqueId}", + "type": 1 +} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "metadata": { + "@type": "type.googleapis.com/google.firestore.admin.v1.CreateDatabaseMetadata" + }, + "name": "projects/${projectId}/databases/firestoredatabase-${uniqueId}/operations/${operationID}", + "response": { + "@type": "type.googleapis.com/mockgcp.firestore.admin.v1.Database", + "appEngineIntegrationMode": 2, + "concurrencyMode": 2, + "createTime": "2024-04-01T12:34:56.123456Z", + "deleteProtectionState": 1, + "earliestVersionTime": "2024-04-01T12:34:56.123456Z", + "etag": "abcdef0123A=", + "locationId": "us-west2", + "name": "projects/${projectId}/databases/firestoredatabase-${uniqueId}", + "pointInTimeRecoveryEnablement": 2, + "type": 1, + "uid": "111111111111111111111", + "updateTime": "2024-04-01T12:34:56.123456Z", + "versionRetentionPeriod": "3600s" + } +} + +--- + +GET https://firestore.googleapis.com/v1/projects/${projectId}/databases/firestoredatabase-${uniqueId}/operations/${operationID} +Content-Type: application/json +User-Agent: kcc/controller-manager +x-goog-request-params: name=projects%2F${projectId}%2Fdatabases%2Ffirestoredatabase-${uniqueId}%2Foperations%2F${operationID} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "done": true, + "metadata": { + "@type": "type.googleapis.com/google.firestore.admin.v1.CreateDatabaseMetadata" + }, + "name": "projects/${projectId}/databases/firestoredatabase-${uniqueId}/operations/${operationID}", + "response": { + "@type": "type.googleapis.com/google.firestore.admin.v1.Database", + "appEngineIntegrationMode": "DISABLED", + "concurrencyMode": "PESSIMISTIC", + "createTime": "2024-04-01T12:34:56.123456Z", + "deleteProtectionState": "DELETE_PROTECTION_DISABLED", + "earliestVersionTime": "2024-04-01T12:34:56.123456Z", + "etag": "abcdef0123A=", + "locationId": "us-west2", + "name": "projects/${projectId}/databases/firestoredatabase-${uniqueId}", + "pointInTimeRecoveryEnablement": "POINT_IN_TIME_RECOVERY_DISABLED", + "type": "FIRESTORE_NATIVE", + "uid": "111111111111111111111", + "updateTime": "2024-04-01T12:34:56.123456Z", + "versionRetentionPeriod": "3600s" + } +} + +--- + +GET https://firestore.googleapis.com/v1/projects/${projectId}/databases/firestoredatabase-${uniqueId}?%24alt=json%3Benum-encoding%3Dint +Content-Type: application/json +User-Agent: kcc/controller-manager +x-goog-request-params: name=projects%2F${projectId}%2Fdatabases%2Ffirestoredatabase-${uniqueId} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "appEngineIntegrationMode": 2, + "concurrencyMode": 2, + "createTime": "2024-04-01T12:34:56.123456Z", + "deleteProtectionState": 1, + "earliestVersionTime": "2024-04-01T12:34:56.123456Z", + "etag": "abcdef0123A=", + "locationId": "us-west2", + "name": "projects/${projectId}/databases/firestoredatabase-${uniqueId}", + "pointInTimeRecoveryEnablement": 2, + "type": 1, + "uid": "111111111111111111111", + "updateTime": "2024-04-01T12:34:56.123456Z", + "versionRetentionPeriod": "3600s" +} + +--- + +DELETE https://firestore.googleapis.com/v1/projects/${projectId}/databases/firestoredatabase-${uniqueId}?%24alt=json%3Benum-encoding%3Dint&etag=abcdef0123A +Content-Type: application/json +User-Agent: kcc/controller-manager +x-goog-request-params: name=projects%2F${projectId}%2Fdatabases%2Ffirestoredatabase-${uniqueId} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "metadata": { + "@type": "type.googleapis.com/google.firestore.admin.v1.DeleteDatabaseMetadata" + }, + "name": "projects/${projectId}/databases/firestoredatabase-${uniqueId}/operations/${operationID}", + "response": { + "@type": "type.googleapis.com/mockgcp.firestore.admin.v1.Database", + "appEngineIntegrationMode": 2, + "concurrencyMode": 2, + "createTime": "2024-04-01T12:34:56.123456Z", + "deleteProtectionState": 1, + "earliestVersionTime": "2024-04-01T12:34:56.123456Z", + "etag": "abcdef0123A=", + "locationId": "us-west2", + "name": "projects/${projectId}/databases/firestoredatabase-${uniqueId}", + "pointInTimeRecoveryEnablement": 2, + "type": 1, + "uid": "111111111111111111111", + "updateTime": "2024-04-01T12:34:56.123456Z", + "versionRetentionPeriod": "3600s" + } +} + +--- + +GET https://firestore.googleapis.com/v1/projects/${projectId}/databases/firestoredatabase-${uniqueId}/operations/${operationID} +Content-Type: application/json +User-Agent: kcc/controller-manager +x-goog-request-params: name=projects%2F${projectId}%2Fdatabases%2Ffirestoredatabase-${uniqueId}%2Foperations%2F${operationID} + +200 OK +Cache-Control: private +Content-Type: application/json; charset=UTF-8 +Server: ESF +Vary: Origin +Vary: X-Origin +Vary: Referer +X-Content-Type-Options: nosniff +X-Frame-Options: SAMEORIGIN +X-Xss-Protection: 0 + +{ + "done": true, + "metadata": { + "@type": "type.googleapis.com/google.firestore.admin.v1.DeleteDatabaseMetadata" + }, + "name": "projects/${projectId}/databases/firestoredatabase-${uniqueId}/operations/${operationID}", + "response": { + "@type": "type.googleapis.com/google.firestore.admin.v1.Database" + } +} \ No newline at end of file diff --git a/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-minimal/create.yaml b/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-minimal/create.yaml new file mode 100644 index 0000000000..eea2aae6f3 --- /dev/null +++ b/pkg/test/resourcefixture/testdata/basic/firestore/v1beta1/firestoredatabase/firestoredatabase-minimal/create.yaml @@ -0,0 +1,23 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: firestore.cnrm.cloud.google.com/v1alpha1 +kind: FirestoreDatabase +metadata: + name: firestoredatabase-minimal-${uniqueId} +spec: + projectRef: + external: ${projectId} + resourceID: firestoredatabase-${uniqueId} + locationID: us-west2 \ No newline at end of file diff --git a/tests/e2e/normalize.go b/tests/e2e/normalize.go index 4e52889d99..08835799ee 100644 --- a/tests/e2e/normalize.go +++ b/tests/e2e/normalize.go @@ -83,6 +83,9 @@ func normalizeKRMObject(t *testing.T, u *unstructured.Unstructured, project test // Specific to Dataflow visitor.sortAndDeduplicateSlices.Insert(".spec.additionalExperiments") + // Specific to Firestore + visitor.replacePaths[".status.observedState.earliestVersionTime"] = "1970-01-01T00:00:00Z" + // Specific to Sql visitor.replacePaths[".items[].etag"] = "abcdef0123A=" visitor.replacePaths[".status.firstIpAddress"] = "10.1.2.3" @@ -500,6 +503,7 @@ func NormalizeHTTPLog(t *testing.T, events test.LogEntries, project testgcp.GCPP events.RemoveHTTPResponseHeader("Date") events.RemoveHTTPResponseHeader("Alt-Svc") events.RemoveHTTPResponseHeader("Server-Timing") + events.RemoveHTTPResponseHeader("X-Debug-Tracking-Id") events.RemoveHTTPResponseHeader("X-Guploader-Uploadid") events.RemoveHTTPResponseHeader("Etag") events.RemoveHTTPResponseHeader("Content-Length") // an artifact of encoding @@ -561,12 +565,15 @@ func normalizeHTTPResponses(t *testing.T, events test.LogEntries) { visitor.replacePaths[".fingerprint"] = "abcdef0123A=" visitor.replacePaths[".startTime"] = "2024-04-01T12:34:56.123456Z" - // Compute URLs: Replace any compute beta URLs with v1 URLs - // Terraform uses the /beta/ endpoints, but mocks and direct controller should use /v1/ - // This special handling to avoid diffs in http logs. - // This can be removed once all Compute resources are migrated to direct controller. for _, event := range events { + // Compute URLs: Replace any compute beta URLs with v1 URLs + // Terraform uses the /beta/ endpoints, but mocks and direct controller should use /v1/ + // This special handling to avoid diffs in http logs. + // This can be removed once all Compute resources are migrated to direct controller. event.Request.URL = rewriteComputeURL(event.Request.URL) + + // Normalize etags in URLS + event.Request.URL = normalizeEtagsInURL(event.Request.URL) } visitor.stringTransforms = append(visitor.stringTransforms, func(path string, s string) string { @@ -631,6 +638,11 @@ func rewriteComputeURL(u string) string { return u } +func normalizeEtagsInURL(u string) string { + re := regexp.MustCompile(`etag=[a-zA-Z0-9%]+`) + return re.ReplaceAllString(u, "etag=abcdef0123A") +} + // isGetOperation returns true if this is an operation poll request func isGetOperation(e *test.LogEntry) bool { if strings.Contains(e.Request.URL, "/operations/${operationID}") { diff --git a/tests/e2e/unified_test.go b/tests/e2e/unified_test.go index 26b03fa3f3..7f9a3cf50e 100644 --- a/tests/e2e/unified_test.go +++ b/tests/e2e/unified_test.go @@ -487,6 +487,7 @@ func runScenario(ctx context.Context, t *testing.T, testPause bool, fixture reso addReplacement("createTime", "2024-04-01T12:34:56.123456Z") addReplacement("insertTime", "2024-04-01T12:34:56.123456Z") addReplacement("response.createTime", "2024-04-01T12:34:56.123456Z") + addReplacement("response.deleteTime", "2024-04-01T12:34:56.123456Z") addReplacement("creationTimestamp", "2024-04-01T12:34:56.123456Z") addReplacement("metadata.createTime", "2024-04-01T12:34:56.123456Z") addReplacement("metadata.genericMetadata.createTime", "2024-04-01T12:34:56.123456Z") @@ -610,6 +611,23 @@ func runScenario(ctx context.Context, t *testing.T, testPause bool, fixture reso addSetStringReplacement(".metadata.requestTime", "2024-04-01T12:34:56.123456Z") addSetStringReplacement(".metadata.finishTime", "2024-04-01T12:34:56.123456Z") + // Specific to Firestore + jsonMutators = append(jsonMutators, func(obj map[string]any) { + if _, found, _ := unstructured.NestedMap(obj, "response"); found { + // Only run this mutator for firestore database objects. + if val, found, err := unstructured.NestedString(obj, "response", "@type"); err == nil && found && val == "type.googleapis.com/google.firestore.admin.v1.Database" { + // Only run this mutator for firestore database objects that have a name set in the response. + if val, found, err := unstructured.NestedString(obj, "response", "name"); err == nil && found && val != "" { + // Set name field to use human-readable ID, instead of UID + // Note: This only works if firestore databases in all resource fixture test cases use the name "firestoredatabase-${uniqueId}" + if err := unstructured.SetNestedField(obj, "projects/${projectId}/databases/firestoredatabase-${uniqueId}", "response", "name"); err != nil { + t.Fatal(err) + } + } + } + } + }) + // Specific to pubsub addReplacement("revisionCreateTime", "2024-04-01T12:34:56.123456Z") addReplacement("revisionId", "revision-id-placeholder")