#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Database {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub uid: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "6")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "9")]
pub location_id: ::prost::alloc::string::String,
#[prost(enumeration = "database::DatabaseType", tag = "10")]
pub r#type: i32,
#[prost(enumeration = "database::ConcurrencyMode", tag = "15")]
pub concurrency_mode: i32,
#[prost(message, optional, tag = "17")]
pub version_retention_period: ::core::option::Option<::prost_types::Duration>,
#[prost(message, optional, tag = "18")]
pub earliest_version_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(enumeration = "database::PointInTimeRecoveryEnablement", tag = "21")]
pub point_in_time_recovery_enablement: i32,
#[prost(enumeration = "database::AppEngineIntegrationMode", tag = "19")]
pub app_engine_integration_mode: i32,
#[prost(string, tag = "20")]
pub key_prefix: ::prost::alloc::string::String,
#[prost(enumeration = "database::DeleteProtectionState", tag = "22")]
pub delete_protection_state: i32,
#[prost(string, tag = "99")]
pub etag: ::prost::alloc::string::String,
}
pub mod database {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum DatabaseType {
Unspecified = 0,
FirestoreNative = 1,
DatastoreMode = 2,
}
impl DatabaseType {
pub fn as_str_name(&self) -> &'static str {
match self {
DatabaseType::Unspecified => "DATABASE_TYPE_UNSPECIFIED",
DatabaseType::FirestoreNative => "FIRESTORE_NATIVE",
DatabaseType::DatastoreMode => "DATASTORE_MODE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DATABASE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"FIRESTORE_NATIVE" => Some(Self::FirestoreNative),
"DATASTORE_MODE" => Some(Self::DatastoreMode),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ConcurrencyMode {
Unspecified = 0,
Optimistic = 1,
Pessimistic = 2,
OptimisticWithEntityGroups = 3,
}
impl ConcurrencyMode {
pub fn as_str_name(&self) -> &'static str {
match self {
ConcurrencyMode::Unspecified => "CONCURRENCY_MODE_UNSPECIFIED",
ConcurrencyMode::Optimistic => "OPTIMISTIC",
ConcurrencyMode::Pessimistic => "PESSIMISTIC",
ConcurrencyMode::OptimisticWithEntityGroups => {
"OPTIMISTIC_WITH_ENTITY_GROUPS"
}
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CONCURRENCY_MODE_UNSPECIFIED" => Some(Self::Unspecified),
"OPTIMISTIC" => Some(Self::Optimistic),
"PESSIMISTIC" => Some(Self::Pessimistic),
"OPTIMISTIC_WITH_ENTITY_GROUPS" => Some(Self::OptimisticWithEntityGroups),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum PointInTimeRecoveryEnablement {
Unspecified = 0,
PointInTimeRecoveryEnabled = 1,
PointInTimeRecoveryDisabled = 2,
}
impl PointInTimeRecoveryEnablement {
pub fn as_str_name(&self) -> &'static str {
match self {
PointInTimeRecoveryEnablement::Unspecified => {
"POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED"
}
PointInTimeRecoveryEnablement::PointInTimeRecoveryEnabled => {
"POINT_IN_TIME_RECOVERY_ENABLED"
}
PointInTimeRecoveryEnablement::PointInTimeRecoveryDisabled => {
"POINT_IN_TIME_RECOVERY_DISABLED"
}
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED" => {
Some(Self::Unspecified)
}
"POINT_IN_TIME_RECOVERY_ENABLED" => {
Some(Self::PointInTimeRecoveryEnabled)
}
"POINT_IN_TIME_RECOVERY_DISABLED" => {
Some(Self::PointInTimeRecoveryDisabled)
}
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum AppEngineIntegrationMode {
Unspecified = 0,
Enabled = 1,
Disabled = 2,
}
impl AppEngineIntegrationMode {
pub fn as_str_name(&self) -> &'static str {
match self {
AppEngineIntegrationMode::Unspecified => {
"APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED"
}
AppEngineIntegrationMode::Enabled => "ENABLED",
AppEngineIntegrationMode::Disabled => "DISABLED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED" => Some(Self::Unspecified),
"ENABLED" => Some(Self::Enabled),
"DISABLED" => Some(Self::Disabled),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum DeleteProtectionState {
Unspecified = 0,
DeleteProtectionDisabled = 1,
DeleteProtectionEnabled = 2,
}
impl DeleteProtectionState {
pub fn as_str_name(&self) -> &'static str {
match self {
DeleteProtectionState::Unspecified => {
"DELETE_PROTECTION_STATE_UNSPECIFIED"
}
DeleteProtectionState::DeleteProtectionDisabled => {
"DELETE_PROTECTION_DISABLED"
}
DeleteProtectionState::DeleteProtectionEnabled => {
"DELETE_PROTECTION_ENABLED"
}
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DELETE_PROTECTION_STATE_UNSPECIFIED" => Some(Self::Unspecified),
"DELETE_PROTECTION_DISABLED" => Some(Self::DeleteProtectionDisabled),
"DELETE_PROTECTION_ENABLED" => Some(Self::DeleteProtectionEnabled),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Backup {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub database: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub database_uid: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub snapshot_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "4")]
pub expire_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "6")]
pub stats: ::core::option::Option<backup::Stats>,
#[prost(enumeration = "backup::State", tag = "8")]
pub state: i32,
}
pub mod backup {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Stats {
#[prost(int64, tag = "1")]
pub size_bytes: i64,
#[prost(int64, tag = "2")]
pub document_count: i64,
#[prost(int64, tag = "3")]
pub index_count: i64,
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
Creating = 1,
Ready = 2,
NotAvailable = 3,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Creating => "CREATING",
State::Ready => "READY",
State::NotAvailable => "NOT_AVAILABLE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"CREATING" => Some(Self::Creating),
"READY" => Some(Self::Ready),
"NOT_AVAILABLE" => Some(Self::NotAvailable),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Index {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(enumeration = "index::QueryScope", tag = "2")]
pub query_scope: i32,
#[prost(enumeration = "index::ApiScope", tag = "5")]
pub api_scope: i32,
#[prost(message, repeated, tag = "3")]
pub fields: ::prost::alloc::vec::Vec<index::IndexField>,
#[prost(enumeration = "index::State", tag = "4")]
pub state: i32,
}
pub mod index {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IndexField {
#[prost(string, tag = "1")]
pub field_path: ::prost::alloc::string::String,
#[prost(oneof = "index_field::ValueMode", tags = "2, 3, 4")]
pub value_mode: ::core::option::Option<index_field::ValueMode>,
}
pub mod index_field {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VectorConfig {
#[prost(int32, tag = "1")]
pub dimension: i32,
#[prost(oneof = "vector_config::Type", tags = "2")]
pub r#type: ::core::option::Option<vector_config::Type>,
}
pub mod vector_config {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FlatIndex {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Type {
#[prost(message, tag = "2")]
Flat(FlatIndex),
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Order {
Unspecified = 0,
Ascending = 1,
Descending = 2,
}
impl Order {
pub fn as_str_name(&self) -> &'static str {
match self {
Order::Unspecified => "ORDER_UNSPECIFIED",
Order::Ascending => "ASCENDING",
Order::Descending => "DESCENDING",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ORDER_UNSPECIFIED" => Some(Self::Unspecified),
"ASCENDING" => Some(Self::Ascending),
"DESCENDING" => Some(Self::Descending),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ArrayConfig {
Unspecified = 0,
Contains = 1,
}
impl ArrayConfig {
pub fn as_str_name(&self) -> &'static str {
match self {
ArrayConfig::Unspecified => "ARRAY_CONFIG_UNSPECIFIED",
ArrayConfig::Contains => "CONTAINS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ARRAY_CONFIG_UNSPECIFIED" => Some(Self::Unspecified),
"CONTAINS" => Some(Self::Contains),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ValueMode {
#[prost(enumeration = "Order", tag = "2")]
Order(i32),
#[prost(enumeration = "ArrayConfig", tag = "3")]
ArrayConfig(i32),
#[prost(message, tag = "4")]
VectorConfig(VectorConfig),
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum QueryScope {
Unspecified = 0,
Collection = 1,
CollectionGroup = 2,
CollectionRecursive = 3,
}
impl QueryScope {
pub fn as_str_name(&self) -> &'static str {
match self {
QueryScope::Unspecified => "QUERY_SCOPE_UNSPECIFIED",
QueryScope::Collection => "COLLECTION",
QueryScope::CollectionGroup => "COLLECTION_GROUP",
QueryScope::CollectionRecursive => "COLLECTION_RECURSIVE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"QUERY_SCOPE_UNSPECIFIED" => Some(Self::Unspecified),
"COLLECTION" => Some(Self::Collection),
"COLLECTION_GROUP" => Some(Self::CollectionGroup),
"COLLECTION_RECURSIVE" => Some(Self::CollectionRecursive),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ApiScope {
AnyApi = 0,
DatastoreModeApi = 1,
}
impl ApiScope {
pub fn as_str_name(&self) -> &'static str {
match self {
ApiScope::AnyApi => "ANY_API",
ApiScope::DatastoreModeApi => "DATASTORE_MODE_API",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ANY_API" => Some(Self::AnyApi),
"DATASTORE_MODE_API" => Some(Self::DatastoreModeApi),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
Creating = 1,
Ready = 2,
NeedsRepair = 3,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Creating => "CREATING",
State::Ready => "READY",
State::NeedsRepair => "NEEDS_REPAIR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"CREATING" => Some(Self::Creating),
"READY" => Some(Self::Ready),
"NEEDS_REPAIR" => Some(Self::NeedsRepair),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IndexOperationMetadata {
#[prost(message, optional, tag = "1")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "2")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "3")]
pub index: ::prost::alloc::string::String,
#[prost(enumeration = "OperationState", tag = "4")]
pub state: i32,
#[prost(message, optional, tag = "5")]
pub progress_documents: ::core::option::Option<Progress>,
#[prost(message, optional, tag = "6")]
pub progress_bytes: ::core::option::Option<Progress>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FieldOperationMetadata {
#[prost(message, optional, tag = "1")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "2")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "3")]
pub field: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "4")]
pub index_config_deltas: ::prost::alloc::vec::Vec<
field_operation_metadata::IndexConfigDelta,
>,
#[prost(enumeration = "OperationState", tag = "5")]
pub state: i32,
#[prost(message, optional, tag = "6")]
pub progress_documents: ::core::option::Option<Progress>,
#[prost(message, optional, tag = "7")]
pub progress_bytes: ::core::option::Option<Progress>,
#[prost(message, optional, tag = "8")]
pub ttl_config_delta: ::core::option::Option<
field_operation_metadata::TtlConfigDelta,
>,
}
pub mod field_operation_metadata {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IndexConfigDelta {
#[prost(enumeration = "index_config_delta::ChangeType", tag = "1")]
pub change_type: i32,
#[prost(message, optional, tag = "2")]
pub index: ::core::option::Option<super::Index>,
}
pub mod index_config_delta {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ChangeType {
Unspecified = 0,
Add = 1,
Remove = 2,
}
impl ChangeType {
pub fn as_str_name(&self) -> &'static str {
match self {
ChangeType::Unspecified => "CHANGE_TYPE_UNSPECIFIED",
ChangeType::Add => "ADD",
ChangeType::Remove => "REMOVE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CHANGE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"ADD" => Some(Self::Add),
"REMOVE" => Some(Self::Remove),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TtlConfigDelta {
#[prost(enumeration = "ttl_config_delta::ChangeType", tag = "1")]
pub change_type: i32,
}
pub mod ttl_config_delta {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ChangeType {
Unspecified = 0,
Add = 1,
Remove = 2,
}
impl ChangeType {
pub fn as_str_name(&self) -> &'static str {
match self {
ChangeType::Unspecified => "CHANGE_TYPE_UNSPECIFIED",
ChangeType::Add => "ADD",
ChangeType::Remove => "REMOVE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CHANGE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"ADD" => Some(Self::Add),
"REMOVE" => Some(Self::Remove),
_ => None,
}
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExportDocumentsMetadata {
#[prost(message, optional, tag = "1")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "2")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(enumeration = "OperationState", tag = "3")]
pub operation_state: i32,
#[prost(message, optional, tag = "4")]
pub progress_documents: ::core::option::Option<Progress>,
#[prost(message, optional, tag = "5")]
pub progress_bytes: ::core::option::Option<Progress>,
#[prost(string, repeated, tag = "6")]
pub collection_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "7")]
pub output_uri_prefix: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "8")]
pub namespace_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "9")]
pub snapshot_time: ::core::option::Option<::prost_types::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ImportDocumentsMetadata {
#[prost(message, optional, tag = "1")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "2")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(enumeration = "OperationState", tag = "3")]
pub operation_state: i32,
#[prost(message, optional, tag = "4")]
pub progress_documents: ::core::option::Option<Progress>,
#[prost(message, optional, tag = "5")]
pub progress_bytes: ::core::option::Option<Progress>,
#[prost(string, repeated, tag = "6")]
pub collection_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "7")]
pub input_uri_prefix: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "8")]
pub namespace_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExportDocumentsResponse {
#[prost(string, tag = "1")]
pub output_uri_prefix: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestoreDatabaseMetadata {
#[prost(message, optional, tag = "1")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "2")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(enumeration = "OperationState", tag = "3")]
pub operation_state: i32,
#[prost(string, tag = "4")]
pub database: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub backup: ::prost::alloc::string::String,
#[prost(message, optional, tag = "8")]
pub progress_percentage: ::core::option::Option<Progress>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Progress {
#[prost(int64, tag = "1")]
pub estimated_work: i64,
#[prost(int64, tag = "2")]
pub completed_work: i64,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OperationState {
Unspecified = 0,
Initializing = 1,
Processing = 2,
Cancelling = 3,
Finalizing = 4,
Successful = 5,
Failed = 6,
Cancelled = 7,
}
impl OperationState {
pub fn as_str_name(&self) -> &'static str {
match self {
OperationState::Unspecified => "OPERATION_STATE_UNSPECIFIED",
OperationState::Initializing => "INITIALIZING",
OperationState::Processing => "PROCESSING",
OperationState::Cancelling => "CANCELLING",
OperationState::Finalizing => "FINALIZING",
OperationState::Successful => "SUCCESSFUL",
OperationState::Failed => "FAILED",
OperationState::Cancelled => "CANCELLED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"OPERATION_STATE_UNSPECIFIED" => Some(Self::Unspecified),
"INITIALIZING" => Some(Self::Initializing),
"PROCESSING" => Some(Self::Processing),
"CANCELLING" => Some(Self::Cancelling),
"FINALIZING" => Some(Self::Finalizing),
"SUCCESSFUL" => Some(Self::Successful),
"FAILED" => Some(Self::Failed),
"CANCELLED" => Some(Self::Cancelled),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BackupSchedule {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "10")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "6")]
pub retention: ::core::option::Option<::prost_types::Duration>,
#[prost(oneof = "backup_schedule::Recurrence", tags = "7, 8")]
pub recurrence: ::core::option::Option<backup_schedule::Recurrence>,
}
pub mod backup_schedule {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Recurrence {
#[prost(message, tag = "7")]
DailyRecurrence(super::DailyRecurrence),
#[prost(message, tag = "8")]
WeeklyRecurrence(super::WeeklyRecurrence),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DailyRecurrence {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WeeklyRecurrence {
#[prost(enumeration = "super::super::super::r#type::DayOfWeek", tag = "2")]
pub day: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Field {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub index_config: ::core::option::Option<field::IndexConfig>,
#[prost(message, optional, tag = "3")]
pub ttl_config: ::core::option::Option<field::TtlConfig>,
}
pub mod field {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IndexConfig {
#[prost(message, repeated, tag = "1")]
pub indexes: ::prost::alloc::vec::Vec<super::Index>,
#[prost(bool, tag = "2")]
pub uses_ancestor_config: bool,
#[prost(string, tag = "3")]
pub ancestor_field: ::prost::alloc::string::String,
#[prost(bool, tag = "4")]
pub reverting: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TtlConfig {
#[prost(enumeration = "ttl_config::State", tag = "1")]
pub state: i32,
}
pub mod ttl_config {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
Creating = 1,
Active = 2,
NeedsRepair = 3,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Creating => "CREATING",
State::Active => "ACTIVE",
State::NeedsRepair => "NEEDS_REPAIR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"CREATING" => Some(Self::Creating),
"ACTIVE" => Some(Self::Active),
"NEEDS_REPAIR" => Some(Self::NeedsRepair),
_ => None,
}
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LocationMetadata {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDatabasesRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDatabaseRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub database: ::core::option::Option<Database>,
#[prost(string, tag = "3")]
pub database_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDatabaseMetadata {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDatabasesResponse {
#[prost(message, repeated, tag = "1")]
pub databases: ::prost::alloc::vec::Vec<Database>,
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDatabaseRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateDatabaseRequest {
#[prost(message, optional, tag = "1")]
pub database: ::core::option::Option<Database>,
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateDatabaseMetadata {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteDatabaseRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub etag: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteDatabaseMetadata {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateBackupScheduleRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub backup_schedule: ::core::option::Option<BackupSchedule>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBackupScheduleRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateBackupScheduleRequest {
#[prost(message, optional, tag = "1")]
pub backup_schedule: ::core::option::Option<BackupSchedule>,
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBackupSchedulesRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBackupSchedulesResponse {
#[prost(message, repeated, tag = "1")]
pub backup_schedules: ::prost::alloc::vec::Vec<BackupSchedule>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteBackupScheduleRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateIndexRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub index: ::core::option::Option<Index>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListIndexesRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub filter: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub page_size: i32,
#[prost(string, tag = "4")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListIndexesResponse {
#[prost(message, repeated, tag = "1")]
pub indexes: ::prost::alloc::vec::Vec<Index>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetIndexRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteIndexRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateFieldRequest {
#[prost(message, optional, tag = "1")]
pub field: ::core::option::Option<Field>,
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetFieldRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListFieldsRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub filter: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub page_size: i32,
#[prost(string, tag = "4")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListFieldsResponse {
#[prost(message, repeated, tag = "1")]
pub fields: ::prost::alloc::vec::Vec<Field>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExportDocumentsRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub collection_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "3")]
pub output_uri_prefix: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "4")]
pub namespace_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "5")]
pub snapshot_time: ::core::option::Option<::prost_types::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ImportDocumentsRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub collection_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "3")]
pub input_uri_prefix: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "4")]
pub namespace_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBackupRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBackupsRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBackupsResponse {
#[prost(message, repeated, tag = "1")]
pub backups: ::prost::alloc::vec::Vec<Backup>,
#[prost(string, repeated, tag = "3")]
pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteBackupRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestoreDatabaseRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub database_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub backup: ::prost::alloc::string::String,
}
pub mod firestore_admin_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct FirestoreAdminClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> FirestoreAdminClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> FirestoreAdminClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
FirestoreAdminClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn create_index(
&mut self,
request: impl tonic::IntoRequest<super::CreateIndexRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.firestore.admin.v1.FirestoreAdmin/CreateIndex",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.firestore.admin.v1.FirestoreAdmin",
"CreateIndex",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_indexes(
&mut self,
request: impl tonic::IntoRequest<super::ListIndexesRequest>,
) -> std::result::Result<
tonic::Response<super::ListIndexesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.firestore.admin.v1.FirestoreAdmin/ListIndexes",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.firestore.admin.v1.FirestoreAdmin",
"ListIndexes",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_index(
&mut self,
request: impl tonic::IntoRequest<super::GetIndexRequest>,
) -> std::result::Result<tonic::Response<super::Index>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.firestore.admin.v1.FirestoreAdmin/GetIndex",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.firestore.admin.v1.FirestoreAdmin",
"GetIndex",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete_index(
&mut self,
request: impl tonic::IntoRequest<super::DeleteIndexRequest>,
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.firestore.admin.v1.FirestoreAdmin/DeleteIndex",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.firestore.admin.v1.FirestoreAdmin",
"DeleteIndex",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_field(
&mut self,
request: impl tonic::IntoRequest<super::GetFieldRequest>,
) -> std::result::Result<tonic::Response<super::Field>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.firestore.admin.v1.FirestoreAdmin/GetField",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.firestore.admin.v1.FirestoreAdmin",
"GetField",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_field(
&mut self,
request: impl tonic::IntoRequest<super::UpdateFieldRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.firestore.admin.v1.FirestoreAdmin/UpdateField",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.firestore.admin.v1.FirestoreAdmin",
"UpdateField",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_fields(
&mut self,
request: impl tonic::IntoRequest<super::ListFieldsRequest>,
) -> std::result::Result<
tonic::Response<super::ListFieldsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.firestore.admin.v1.FirestoreAdmin/ListFields",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.firestore.admin.v1.FirestoreAdmin",
"ListFields",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn export_documents(
&mut self,
request: impl tonic::IntoRequest<super::ExportDocumentsRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.firestore.admin.v1.FirestoreAdmin/ExportDocuments",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.firestore.admin.v1.FirestoreAdmin",
"ExportDocuments",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn import_documents(
&mut self,
request: impl tonic::IntoRequest<super::ImportDocumentsRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.firestore.admin.v1.FirestoreAdmin/ImportDocuments",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.firestore.admin.v1.FirestoreAdmin",
"ImportDocuments",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn create_database(
&mut self,
request: impl tonic::IntoRequest<super::CreateDatabaseRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.firestore.admin.v1.FirestoreAdmin/CreateDatabase",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.firestore.admin.v1.FirestoreAdmin",
"CreateDatabase",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_database(
&mut self,
request: impl tonic::IntoRequest<super::GetDatabaseRequest>,
) -> std::result::Result<tonic::Response<super::Database>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.firestore.admin.v1.FirestoreAdmin/GetDatabase",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.firestore.admin.v1.FirestoreAdmin",
"GetDatabase",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_databases(
&mut self,
request: impl tonic::IntoRequest<super::ListDatabasesRequest>,
) -> std::result::Result<
tonic::Response<super::ListDatabasesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.firestore.admin.v1.FirestoreAdmin/ListDatabases",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.firestore.admin.v1.FirestoreAdmin",
"ListDatabases",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_database(
&mut self,
request: impl tonic::IntoRequest<super::UpdateDatabaseRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.firestore.admin.v1.FirestoreAdmin/UpdateDatabase",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.firestore.admin.v1.FirestoreAdmin",
"UpdateDatabase",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete_database(
&mut self,
request: impl tonic::IntoRequest<super::DeleteDatabaseRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.firestore.admin.v1.FirestoreAdmin/DeleteDatabase",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.firestore.admin.v1.FirestoreAdmin",
"DeleteDatabase",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_backup(
&mut self,
request: impl tonic::IntoRequest<super::GetBackupRequest>,
) -> std::result::Result<tonic::Response<super::Backup>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.firestore.admin.v1.FirestoreAdmin/GetBackup",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.firestore.admin.v1.FirestoreAdmin",
"GetBackup",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_backups(
&mut self,
request: impl tonic::IntoRequest<super::ListBackupsRequest>,
) -> std::result::Result<
tonic::Response<super::ListBackupsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.firestore.admin.v1.FirestoreAdmin/ListBackups",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.firestore.admin.v1.FirestoreAdmin",
"ListBackups",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete_backup(
&mut self,
request: impl tonic::IntoRequest<super::DeleteBackupRequest>,
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.firestore.admin.v1.FirestoreAdmin/DeleteBackup",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.firestore.admin.v1.FirestoreAdmin",
"DeleteBackup",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn restore_database(
&mut self,
request: impl tonic::IntoRequest<super::RestoreDatabaseRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.firestore.admin.v1.FirestoreAdmin/RestoreDatabase",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.firestore.admin.v1.FirestoreAdmin",
"RestoreDatabase",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn create_backup_schedule(
&mut self,
request: impl tonic::IntoRequest<super::CreateBackupScheduleRequest>,
) -> std::result::Result<tonic::Response<super::BackupSchedule>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.firestore.admin.v1.FirestoreAdmin/CreateBackupSchedule",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.firestore.admin.v1.FirestoreAdmin",
"CreateBackupSchedule",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_backup_schedule(
&mut self,
request: impl tonic::IntoRequest<super::GetBackupScheduleRequest>,
) -> std::result::Result<tonic::Response<super::BackupSchedule>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.firestore.admin.v1.FirestoreAdmin/GetBackupSchedule",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.firestore.admin.v1.FirestoreAdmin",
"GetBackupSchedule",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_backup_schedules(
&mut self,
request: impl tonic::IntoRequest<super::ListBackupSchedulesRequest>,
) -> std::result::Result<
tonic::Response<super::ListBackupSchedulesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.firestore.admin.v1.FirestoreAdmin/ListBackupSchedules",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.firestore.admin.v1.FirestoreAdmin",
"ListBackupSchedules",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_backup_schedule(
&mut self,
request: impl tonic::IntoRequest<super::UpdateBackupScheduleRequest>,
) -> std::result::Result<tonic::Response<super::BackupSchedule>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.firestore.admin.v1.FirestoreAdmin/UpdateBackupSchedule",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.firestore.admin.v1.FirestoreAdmin",
"UpdateBackupSchedule",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete_backup_schedule(
&mut self,
request: impl tonic::IntoRequest<super::DeleteBackupScheduleRequest>,
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.firestore.admin.v1.FirestoreAdmin/DeleteBackupSchedule",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.firestore.admin.v1.FirestoreAdmin",
"DeleteBackupSchedule",
),
);
self.inner.unary(req, path, codec).await
}
}
}