#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Policy {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "4")]
pub updated_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(bool, tag = "5")]
pub enabled: bool,
#[prost(message, optional, tag = "6")]
pub settings: ::core::option::Option<PolicySettings>,
#[prost(string, tag = "7")]
pub folder_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PolicySettings {
#[prost(enumeration = "policy_settings::Compression", tag = "1")]
pub compression: i32,
#[prost(enumeration = "Format", tag = "2")]
pub format: i32,
#[prost(bool, tag = "3")]
pub multi_volume_snapshotting_enabled: bool,
#[deprecated]
#[prost(bool, tag = "4")]
pub preserve_file_security_settings: bool,
#[prost(message, optional, tag = "5")]
pub reattempts: ::core::option::Option<policy_settings::RetriesConfiguration>,
#[prost(bool, tag = "6")]
pub silent_mode_enabled: bool,
#[prost(message, optional, tag = "7")]
pub splitting: ::core::option::Option<policy_settings::Splitting>,
#[prost(message, optional, tag = "8")]
pub vm_snapshot_reattempts: ::core::option::Option<
policy_settings::RetriesConfiguration,
>,
#[prost(message, optional, tag = "9")]
pub vss: ::core::option::Option<policy_settings::VolumeShadowCopyServiceSettings>,
#[prost(message, optional, tag = "10")]
pub archive: ::core::option::Option<policy_settings::ArchiveProperties>,
#[prost(message, optional, tag = "11")]
pub performance_window: ::core::option::Option<policy_settings::PerformanceWindow>,
#[prost(message, optional, tag = "12")]
pub retention: ::core::option::Option<policy_settings::Retention>,
#[prost(message, optional, tag = "15")]
pub scheduling: ::core::option::Option<policy_settings::Scheduling>,
#[prost(enumeration = "policy_settings::ChangedBlockTracking", tag = "16")]
pub cbt: i32,
#[prost(bool, tag = "17")]
pub fast_backup_enabled: bool,
#[deprecated]
#[prost(bool, tag = "18")]
pub quiesce_snapshotting_enabled: bool,
#[prost(message, optional, tag = "19")]
pub file_filters: ::core::option::Option<policy_settings::FileFilters>,
#[prost(bool, tag = "20")]
pub sector_by_sector: bool,
#[prost(bool, tag = "21")]
pub validation_enabled: bool,
#[prost(bool, tag = "22")]
pub lvm_snapshotting_enabled: bool,
}
pub mod policy_settings {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Interval {
#[prost(enumeration = "interval::Type", tag = "1")]
pub r#type: i32,
#[prost(int64, tag = "2")]
pub count: i64,
}
pub mod interval {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
Unspecified = 0,
Seconds = 1,
Minutes = 2,
Hours = 3,
Days = 4,
Weeks = 5,
Months = 6,
}
impl Type {
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::Seconds => "SECONDS",
Type::Minutes => "MINUTES",
Type::Hours => "HOURS",
Type::Days => "DAYS",
Type::Weeks => "WEEKS",
Type::Months => "MONTHS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"SECONDS" => Some(Self::Seconds),
"MINUTES" => Some(Self::Minutes),
"HOURS" => Some(Self::Hours),
"DAYS" => Some(Self::Days),
"WEEKS" => Some(Self::Weeks),
"MONTHS" => Some(Self::Months),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RetriesConfiguration {
#[prost(bool, tag = "1")]
pub enabled: bool,
#[prost(message, optional, tag = "2")]
pub interval: ::core::option::Option<Interval>,
#[prost(int64, tag = "3")]
pub max_attempts: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Splitting {
#[prost(int64, tag = "1")]
pub size: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VolumeShadowCopyServiceSettings {
#[prost(bool, tag = "1")]
pub enabled: bool,
#[prost(
enumeration = "volume_shadow_copy_service_settings::VssProvider",
tag = "2"
)]
pub provider: i32,
}
pub mod volume_shadow_copy_service_settings {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum VssProvider {
Unspecified = 0,
Native = 1,
TargetSystemDefined = 2,
}
impl VssProvider {
pub fn as_str_name(&self) -> &'static str {
match self {
VssProvider::Unspecified => "VSS_PROVIDER_UNSPECIFIED",
VssProvider::Native => "NATIVE",
VssProvider::TargetSystemDefined => "TARGET_SYSTEM_DEFINED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"VSS_PROVIDER_UNSPECIFIED" => Some(Self::Unspecified),
"NATIVE" => Some(Self::Native),
"TARGET_SYSTEM_DEFINED" => Some(Self::TargetSystemDefined),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ArchiveProperties {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PerformanceWindow {
#[prost(bool, tag = "1")]
pub enabled: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimeOfDay {
#[prost(int64, tag = "1")]
pub hour: i64,
#[prost(int64, tag = "2")]
pub minute: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Retention {
#[prost(message, repeated, tag = "1")]
pub rules: ::prost::alloc::vec::Vec<retention::RetentionRule>,
#[prost(bool, tag = "3")]
pub before_backup: bool,
}
pub mod retention {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RetentionRule {
#[prost(enumeration = "super::RepeatePeriod", repeated, tag = "1")]
pub backup_set: ::prost::alloc::vec::Vec<i32>,
#[prost(oneof = "retention_rule::Condition", tags = "2, 3")]
pub condition: ::core::option::Option<retention_rule::Condition>,
}
pub mod retention_rule {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Condition {
#[prost(message, tag = "2")]
MaxAge(super::super::Interval),
#[prost(int64, tag = "3")]
MaxCount(i64),
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Scheduling {
#[prost(message, repeated, tag = "1")]
pub backup_sets: ::prost::alloc::vec::Vec<scheduling::BackupSet>,
#[prost(bool, tag = "2")]
pub enabled: bool,
#[prost(int64, tag = "3")]
pub max_parallel_backups: i64,
#[prost(message, optional, tag = "4")]
pub rand_max_delay: ::core::option::Option<Interval>,
#[prost(enumeration = "scheduling::Scheme", tag = "5")]
pub scheme: i32,
#[prost(enumeration = "Day", tag = "6")]
pub weekly_backup_day: i32,
#[prost(message, optional, tag = "7")]
pub task_failure: ::core::option::Option<RetriesConfiguration>,
}
pub mod scheduling {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BackupSet {
#[prost(enumeration = "backup_set::Type", tag = "3")]
pub r#type: i32,
#[prost(oneof = "backup_set::Setting", tags = "1, 2")]
pub setting: ::core::option::Option<backup_set::Setting>,
}
pub mod backup_set {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Time {
#[prost(
enumeration = "super::super::Day",
repeated,
packed = "false",
tag = "1"
)]
pub weekdays: ::prost::alloc::vec::Vec<i32>,
#[prost(message, repeated, tag = "2")]
pub repeat_at: ::prost::alloc::vec::Vec<super::super::TimeOfDay>,
#[prost(message, optional, tag = "3")]
pub repeat_every: ::core::option::Option<super::super::Interval>,
#[prost(message, optional, tag = "4")]
pub time_from: ::core::option::Option<super::super::TimeOfDay>,
#[prost(message, optional, tag = "5")]
pub time_to: ::core::option::Option<super::super::TimeOfDay>,
#[prost(int64, repeated, packed = "false", tag = "6")]
pub monthdays: ::prost::alloc::vec::Vec<i64>,
#[prost(bool, tag = "7")]
pub include_last_day_of_month: bool,
#[prost(int64, repeated, packed = "false", tag = "8")]
pub months: ::prost::alloc::vec::Vec<i64>,
#[prost(enumeration = "super::super::RepeatePeriod", tag = "9")]
pub r#type: i32,
#[prost(bool, tag = "10")]
pub run_later: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SinceLastExecTime {
#[prost(message, optional, tag = "1")]
pub delay: ::core::option::Option<super::super::Interval>,
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
Unspecified = 0,
Auto = 1,
Full = 2,
Incremental = 3,
Differential = 4,
}
impl Type {
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::Auto => "TYPE_AUTO",
Type::Full => "TYPE_FULL",
Type::Incremental => "TYPE_INCREMENTAL",
Type::Differential => "TYPE_DIFFERENTIAL",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"TYPE_AUTO" => Some(Self::Auto),
"TYPE_FULL" => Some(Self::Full),
"TYPE_INCREMENTAL" => Some(Self::Incremental),
"TYPE_DIFFERENTIAL" => Some(Self::Differential),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Setting {
#[prost(message, tag = "1")]
Time(Time),
#[prost(message, tag = "2")]
SinceLastExecTime(SinceLastExecTime),
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Scheme {
Unspecified = 0,
Simple = 1,
AlwaysFull = 2,
AlwaysIncremental = 3,
WeeklyIncremental = 4,
WeeklyFullDailyIncremental = 5,
Custom = 6,
Cdp = 7,
}
impl Scheme {
pub fn as_str_name(&self) -> &'static str {
match self {
Scheme::Unspecified => "SCHEME_UNSPECIFIED",
Scheme::Simple => "SIMPLE",
Scheme::AlwaysFull => "ALWAYS_FULL",
Scheme::AlwaysIncremental => "ALWAYS_INCREMENTAL",
Scheme::WeeklyIncremental => "WEEKLY_INCREMENTAL",
Scheme::WeeklyFullDailyIncremental => "WEEKLY_FULL_DAILY_INCREMENTAL",
Scheme::Custom => "CUSTOM",
Scheme::Cdp => "CDP",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SCHEME_UNSPECIFIED" => Some(Self::Unspecified),
"SIMPLE" => Some(Self::Simple),
"ALWAYS_FULL" => Some(Self::AlwaysFull),
"ALWAYS_INCREMENTAL" => Some(Self::AlwaysIncremental),
"WEEKLY_INCREMENTAL" => Some(Self::WeeklyIncremental),
"WEEKLY_FULL_DAILY_INCREMENTAL" => {
Some(Self::WeeklyFullDailyIncremental)
}
"CUSTOM" => Some(Self::Custom),
"CDP" => Some(Self::Cdp),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FileFilters {
#[prost(string, repeated, tag = "1")]
pub exclusion_masks: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "2")]
pub inclusion_masks: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Compression {
Unspecified = 0,
Normal = 1,
High = 2,
Max = 3,
Off = 4,
}
impl Compression {
pub fn as_str_name(&self) -> &'static str {
match self {
Compression::Unspecified => "COMPRESSION_UNSPECIFIED",
Compression::Normal => "NORMAL",
Compression::High => "HIGH",
Compression::Max => "MAX",
Compression::Off => "OFF",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"COMPRESSION_UNSPECIFIED" => Some(Self::Unspecified),
"NORMAL" => Some(Self::Normal),
"HIGH" => Some(Self::High),
"MAX" => Some(Self::Max),
"OFF" => Some(Self::Off),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum RepeatePeriod {
Unspecified = 0,
Hourly = 1,
Daily = 2,
Weekly = 3,
Monthly = 4,
}
impl RepeatePeriod {
pub fn as_str_name(&self) -> &'static str {
match self {
RepeatePeriod::Unspecified => "REPEATE_PERIOD_UNSPECIFIED",
RepeatePeriod::Hourly => "HOURLY",
RepeatePeriod::Daily => "DAILY",
RepeatePeriod::Weekly => "WEEKLY",
RepeatePeriod::Monthly => "MONTHLY",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"REPEATE_PERIOD_UNSPECIFIED" => Some(Self::Unspecified),
"HOURLY" => Some(Self::Hourly),
"DAILY" => Some(Self::Daily),
"WEEKLY" => Some(Self::Weekly),
"MONTHLY" => Some(Self::Monthly),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Day {
Unspecified = 0,
Monday = 1,
Tuesday = 2,
Wednesday = 3,
Thursday = 4,
Friday = 5,
Saturday = 6,
Sunday = 7,
}
impl Day {
pub fn as_str_name(&self) -> &'static str {
match self {
Day::Unspecified => "DAY_UNSPECIFIED",
Day::Monday => "MONDAY",
Day::Tuesday => "TUESDAY",
Day::Wednesday => "WEDNESDAY",
Day::Thursday => "THURSDAY",
Day::Friday => "FRIDAY",
Day::Saturday => "SATURDAY",
Day::Sunday => "SUNDAY",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DAY_UNSPECIFIED" => Some(Self::Unspecified),
"MONDAY" => Some(Self::Monday),
"TUESDAY" => Some(Self::Tuesday),
"WEDNESDAY" => Some(Self::Wednesday),
"THURSDAY" => Some(Self::Thursday),
"FRIDAY" => Some(Self::Friday),
"SATURDAY" => Some(Self::Saturday),
"SUNDAY" => Some(Self::Sunday),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ChangedBlockTracking {
Unspecified = 0,
UseIfEnabled = 1,
EnableAndUse = 2,
DoNotUse = 3,
}
impl ChangedBlockTracking {
pub fn as_str_name(&self) -> &'static str {
match self {
ChangedBlockTracking::Unspecified => "CHANGED_BLOCK_TRACKING_UNSPECIFIED",
ChangedBlockTracking::UseIfEnabled => "USE_IF_ENABLED",
ChangedBlockTracking::EnableAndUse => "ENABLE_AND_USE",
ChangedBlockTracking::DoNotUse => "DO_NOT_USE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CHANGED_BLOCK_TRACKING_UNSPECIFIED" => Some(Self::Unspecified),
"USE_IF_ENABLED" => Some(Self::UseIfEnabled),
"ENABLE_AND_USE" => Some(Self::EnableAndUse),
"DO_NOT_USE" => Some(Self::DoNotUse),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PolicyApplication {
#[prost(string, tag = "1")]
pub policy_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub compute_instance_id: ::prost::alloc::string::String,
#[prost(bool, tag = "3")]
pub enabled: bool,
#[prost(enumeration = "policy_application::Status", tag = "4")]
pub status: i32,
#[prost(message, optional, tag = "5")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(bool, tag = "6")]
pub is_processing: bool,
}
pub mod policy_application {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Status {
Unspecified = 0,
Ok = 1,
Running = 2,
Disabled = 3,
}
impl Status {
pub fn as_str_name(&self) -> &'static str {
match self {
Status::Unspecified => "STATUS_UNSPECIFIED",
Status::Ok => "OK",
Status::Running => "RUNNING",
Status::Disabled => "DISABLED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"OK" => Some(Self::Ok),
"RUNNING" => Some(Self::Running),
"DISABLED" => Some(Self::Disabled),
_ => None,
}
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Format {
Unspecified = 0,
Version11 = 1,
Version12 = 2,
Auto = 3,
}
impl Format {
pub fn as_str_name(&self) -> &'static str {
match self {
Format::Unspecified => "FORMAT_UNSPECIFIED",
Format::Version11 => "VERSION_11",
Format::Version12 => "VERSION_12",
Format::Auto => "AUTO",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"FORMAT_UNSPECIFIED" => Some(Self::Unspecified),
"VERSION_11" => Some(Self::Version11),
"VERSION_12" => Some(Self::Version12),
"AUTO" => Some(Self::Auto),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Archive {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub vault_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub attributes: ::core::option::Option<archive::ArchiveAttributes>,
#[prost(int64, tag = "5")]
pub size: i64,
#[prost(int64, tag = "6")]
pub compressed_data_size: i64,
#[prost(int64, tag = "7")]
pub data_size: i64,
#[prost(int64, tag = "8")]
pub original_data_size: i64,
#[prost(int64, tag = "9")]
pub logical_size: i64,
#[prost(enumeration = "Format", tag = "10")]
pub format: i32,
#[prost(message, optional, tag = "11")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "12")]
pub updated_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "13")]
pub last_backup_created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "14")]
pub last_seen_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(bool, tag = "15")]
pub protected_by_password: bool,
#[prost(enumeration = "archive::EncryptionAlgorithm", tag = "16")]
pub encryption_algorithm: i32,
#[prost(enumeration = "archive::Action", repeated, tag = "20")]
pub actions: ::prost::alloc::vec::Vec<i32>,
#[prost(string, tag = "22")]
pub backup_plan_id: ::prost::alloc::string::String,
#[prost(string, tag = "23")]
pub backup_plan_name: ::prost::alloc::string::String,
#[prost(string, tag = "24")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "25")]
pub display_name: ::prost::alloc::string::String,
#[prost(string, tag = "26")]
pub compute_instance_id: ::prost::alloc::string::String,
#[prost(bool, tag = "27")]
pub consistent: bool,
#[prost(bool, tag = "30")]
pub deleted: bool,
#[prost(string, tag = "31")]
pub resource_id: ::prost::alloc::string::String,
}
pub mod archive {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ArchiveAttributes {
#[prost(string, tag = "1")]
pub aaib: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub uri: ::prost::alloc::string::String,
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum EncryptionAlgorithm {
Unspecified = 0,
None = 1,
Aes128 = 2,
Aes192 = 3,
Aes256 = 4,
}
impl EncryptionAlgorithm {
pub fn as_str_name(&self) -> &'static str {
match self {
EncryptionAlgorithm::Unspecified => "ENCRYPTION_ALGORITHM_UNSPECIFIED",
EncryptionAlgorithm::None => "NONE",
EncryptionAlgorithm::Aes128 => "AES128",
EncryptionAlgorithm::Aes192 => "AES192",
EncryptionAlgorithm::Aes256 => "AES256",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ENCRYPTION_ALGORITHM_UNSPECIFIED" => Some(Self::Unspecified),
"NONE" => Some(Self::None),
"AES128" => Some(Self::Aes128),
"AES192" => Some(Self::Aes192),
"AES256" => Some(Self::Aes256),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Action {
Unspecified = 0,
Refresh = 1,
DeleteByAgent = 2,
}
impl Action {
pub fn as_str_name(&self) -> &'static str {
match self {
Action::Unspecified => "ACTION_UNSPECIFIED",
Action::Refresh => "REFRESH",
Action::DeleteByAgent => "DELETE_BY_AGENT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ACTION_UNSPECIFIED" => Some(Self::Unspecified),
"REFRESH" => Some(Self::Refresh),
"DELETE_BY_AGENT" => Some(Self::DeleteByAgent),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Volume {
#[prost(int64, tag = "1")]
pub free_space: i64,
#[prost(bool, tag = "2")]
pub is_bootable: bool,
#[prost(bool, tag = "3")]
pub is_system: bool,
#[prost(string, tag = "4")]
pub name: ::prost::alloc::string::String,
#[prost(int64, tag = "5")]
pub size: i64,
#[prost(string, tag = "6")]
pub mount_strid: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Disk {
#[prost(string, tag = "1")]
pub device_model: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(int64, tag = "3")]
pub size: i64,
#[prost(message, repeated, tag = "4")]
pub volumes: ::prost::alloc::vec::Vec<Volume>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Backup {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub vault_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub archive_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "5")]
pub last_seen_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(int64, tag = "6")]
pub size: i64,
#[prost(int64, tag = "7")]
pub deduplicated_size: i64,
#[prost(int64, tag = "8")]
pub backed_up_data_size: i64,
#[prost(int64, tag = "9")]
pub original_data_size: i64,
#[prost(message, optional, tag = "10")]
pub attributes: ::core::option::Option<backup::BackupAttributes>,
#[prost(string, tag = "11")]
pub compute_instance_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "14")]
pub disks: ::prost::alloc::vec::Vec<Disk>,
#[prost(enumeration = "backup::Type", tag = "15")]
pub r#type: i32,
#[prost(bool, tag = "21")]
pub deleted: bool,
#[prost(string, tag = "22")]
pub policy_id: ::prost::alloc::string::String,
#[prost(string, tag = "23")]
pub resource_id: ::prost::alloc::string::String,
}
pub mod backup {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BackupAttributes {
#[prost(string, tag = "1")]
pub stream_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub uri: ::prost::alloc::string::String,
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
Unspecified = 0,
Full = 1,
Incremental = 2,
}
impl Type {
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::Full => "FULL",
Type::Incremental => "INCREMENTAL",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"FULL" => Some(Self::Full),
"INCREMENTAL" => Some(Self::Incremental),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BackupFile {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub parent_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(enumeration = "backup_file::Type", tag = "3")]
pub r#type: i32,
#[prost(string, tag = "4")]
pub full_path: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub name: ::prost::alloc::string::String,
#[prost(int64, tag = "6")]
pub size: i64,
#[prost(message, optional, tag = "7")]
pub actions: ::core::option::Option<backup_file::Actions>,
#[prost(message, optional, tag = "8")]
pub modified_at: ::core::option::Option<::prost_types::Timestamp>,
}
pub mod backup_file {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Actions {
#[prost(bool, tag = "1")]
pub restore_to_disk: bool,
#[prost(bool, tag = "2")]
pub go_to_location: bool,
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
Unspecified = 0,
Dir = 1,
File = 2,
}
impl Type {
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::Dir => "TYPE_DIR",
Type::File => "TYPE_FILE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"TYPE_DIR" => Some(Self::Dir),
"TYPE_FILE" => Some(Self::File),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TenantInfo {
#[prost(string, tag = "1")]
pub folder_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub personal_tenant_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub user_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Resource {
#[prost(string, tag = "1")]
pub compute_instance_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "3")]
pub updated_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(bool, tag = "4")]
pub online: bool,
#[prost(bool, tag = "5")]
pub enabled: bool,
#[prost(enumeration = "resource::Status", tag = "6")]
pub status: i32,
#[prost(string, tag = "7")]
pub status_details: ::prost::alloc::string::String,
#[prost(int64, tag = "8")]
pub status_progress: i64,
#[prost(message, optional, tag = "9")]
pub last_backup_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "10")]
pub next_backup_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "11")]
pub resource_id: ::prost::alloc::string::String,
#[prost(bool, tag = "12")]
pub is_active: bool,
#[prost(enumeration = "resource::InitStatus", tag = "13")]
pub init_status: i32,
#[prost(string, tag = "14")]
pub metadata: ::prost::alloc::string::String,
#[prost(enumeration = "ResourceType", tag = "15")]
pub r#type: i32,
#[prost(message, optional, tag = "16")]
pub tenant_info: ::core::option::Option<TenantInfo>,
}
pub mod resource {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Status {
Unspecified = 0,
Idle = 1,
Backuping = 2,
Recovering = 3,
Failed = 4,
Other = 5,
}
impl Status {
pub fn as_str_name(&self) -> &'static str {
match self {
Status::Unspecified => "STATUS_UNSPECIFIED",
Status::Idle => "IDLE",
Status::Backuping => "BACKUPING",
Status::Recovering => "RECOVERING",
Status::Failed => "FAILED",
Status::Other => "OTHER",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"IDLE" => Some(Self::Idle),
"BACKUPING" => Some(Self::Backuping),
"RECOVERING" => Some(Self::Recovering),
"FAILED" => Some(Self::Failed),
"OTHER" => Some(Self::Other),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum InitStatus {
Unspecified = 0,
Registering = 1,
Registred = 2,
FailedRegistration = 3,
Deleted = 4,
}
impl InitStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
InitStatus::Unspecified => "INIT_STATUS_UNSPECIFIED",
InitStatus::Registering => "REGISTERING",
InitStatus::Registred => "REGISTRED",
InitStatus::FailedRegistration => "FAILED_REGISTRATION",
InitStatus::Deleted => "DELETED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"INIT_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"REGISTERING" => Some(Self::Registering),
"REGISTRED" => Some(Self::Registred),
"FAILED_REGISTRATION" => Some(Self::FailedRegistration),
"DELETED" => Some(Self::Deleted),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Progress {
#[prost(int64, tag = "1")]
pub current: i64,
#[prost(int64, tag = "2")]
pub total: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Task {
#[prost(int64, tag = "1")]
pub id: i64,
#[prost(bool, tag = "2")]
pub cancellable: bool,
#[prost(string, tag = "3")]
pub policy_id: ::prost::alloc::string::String,
#[prost(enumeration = "task::Type", tag = "4")]
pub r#type: i32,
#[prost(message, optional, tag = "5")]
pub progress: ::core::option::Option<Progress>,
#[prost(enumeration = "task::Status", tag = "6")]
pub status: i32,
#[prost(message, optional, tag = "7")]
pub enqueued_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "8")]
pub started_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "9")]
pub updated_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "10")]
pub completed_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "11")]
pub compute_instance_id: ::prost::alloc::string::String,
#[prost(enumeration = "task::Code", tag = "12")]
pub result_code: i32,
#[prost(string, tag = "13")]
pub error: ::prost::alloc::string::String,
}
pub mod task {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
Unspecified = 0,
Backup = 1,
Retention = 2,
Recovery = 3,
ApplyPolicy = 4,
RevokePolicy = 5,
}
impl Type {
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::Backup => "BACKUP",
Type::Retention => "RETENTION",
Type::Recovery => "RECOVERY",
Type::ApplyPolicy => "APPLY_POLICY",
Type::RevokePolicy => "REVOKE_POLICY",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"BACKUP" => Some(Self::Backup),
"RETENTION" => Some(Self::Retention),
"RECOVERY" => Some(Self::Recovery),
"APPLY_POLICY" => Some(Self::ApplyPolicy),
"REVOKE_POLICY" => Some(Self::RevokePolicy),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Status {
Unspecified = 0,
Enqueued = 1,
Assigned = 2,
Started = 3,
Paused = 4,
Completed = 5,
}
impl Status {
pub fn as_str_name(&self) -> &'static str {
match self {
Status::Unspecified => "STATUS_UNSPECIFIED",
Status::Enqueued => "ENQUEUED",
Status::Assigned => "ASSIGNED",
Status::Started => "STARTED",
Status::Paused => "PAUSED",
Status::Completed => "COMPLETED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"ENQUEUED" => Some(Self::Enqueued),
"ASSIGNED" => Some(Self::Assigned),
"STARTED" => Some(Self::Started),
"PAUSED" => Some(Self::Paused),
"COMPLETED" => Some(Self::Completed),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Code {
Unspecified = 0,
Ok = 1,
Error = 2,
Warning = 3,
Cancelled = 4,
Abandoned = 5,
Timedout = 6,
}
impl Code {
pub fn as_str_name(&self) -> &'static str {
match self {
Code::Unspecified => "CODE_UNSPECIFIED",
Code::Ok => "OK",
Code::Error => "ERROR",
Code::Warning => "WARNING",
Code::Cancelled => "CANCELLED",
Code::Abandoned => "ABANDONED",
Code::Timedout => "TIMEDOUT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CODE_UNSPECIFIED" => Some(Self::Unspecified),
"OK" => Some(Self::Ok),
"ERROR" => Some(Self::Error),
"WARNING" => Some(Self::Warning),
"CANCELLED" => Some(Self::Cancelled),
"ABANDONED" => Some(Self::Abandoned),
"TIMEDOUT" => Some(Self::Timedout),
_ => None,
}
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ResourceType {
Unspecified = 0,
Compute = 1,
Bms = 2,
}
impl ResourceType {
pub fn as_str_name(&self) -> &'static str {
match self {
ResourceType::Unspecified => "RESOURCE_TYPE_UNSPECIFIED",
ResourceType::Compute => "COMPUTE",
ResourceType::Bms => "BMS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"RESOURCE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"COMPUTE" => Some(Self::Compute),
"BMS" => Some(Self::Bms),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListArchivesRequest {
#[prost(oneof = "list_archives_request::Id", tags = "1, 2")]
pub id: ::core::option::Option<list_archives_request::Id>,
}
pub mod list_archives_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Id {
#[prost(string, tag = "1")]
FolderId(::prost::alloc::string::String),
#[prost(string, tag = "2")]
ComputeInstanceId(::prost::alloc::string::String),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListArchivesResponse {
#[prost(message, repeated, tag = "1")]
pub archives: ::prost::alloc::vec::Vec<Archive>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBackupsRequest {
#[prost(string, tag = "5")]
pub order_by: ::prost::alloc::string::String,
#[prost(string, tag = "8")]
pub filter: ::prost::alloc::string::String,
#[prost(enumeration = "ResourceType", tag = "9")]
pub r#type: i32,
#[prost(int64, tag = "10")]
pub page_size: i64,
#[prost(string, tag = "11")]
pub page_token: ::prost::alloc::string::String,
#[prost(oneof = "list_backups_request::Id", tags = "1, 2, 3, 4, 6, 7")]
pub id: ::core::option::Option<list_backups_request::Id>,
}
pub mod list_backups_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ArchiveParameters {
#[prost(string, tag = "1")]
pub archive_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub folder_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InstancePolicy {
#[prost(string, tag = "1")]
pub compute_instance_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub policy_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Id {
#[prost(string, tag = "1")]
ComputeInstanceId(::prost::alloc::string::String),
#[prost(message, tag = "2")]
Archive(ArchiveParameters),
#[prost(string, tag = "3")]
FolderId(::prost::alloc::string::String),
#[prost(message, tag = "4")]
InstancePolicy(InstancePolicy),
#[prost(string, tag = "6")]
ResourceId(::prost::alloc::string::String),
#[prost(string, tag = "7")]
PolicyId(::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, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListFilesRequest {
#[prost(string, tag = "1")]
pub folder_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub backup_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub source_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListFilesResponse {
#[prost(message, repeated, tag = "1")]
pub files: ::prost::alloc::vec::Vec<BackupFile>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBackupRequest {
#[prost(string, tag = "1")]
pub backup_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub folder_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartRecoveryRequest {
#[prost(string, tag = "1")]
pub compute_instance_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub backup_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartRecoveryMetadata {
#[prost(double, tag = "1")]
pub progress_percentage: f64,
#[prost(string, tag = "2")]
pub src_backup_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub dst_compute_instance_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TargetPathOriginal {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TargetPathCustom {
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FilesRecoveryOptions {
#[prost(enumeration = "files_recovery_options::Overwrite", tag = "1")]
pub overwrite: i32,
#[prost(bool, tag = "2")]
pub reboot_if_needed: bool,
#[prost(oneof = "files_recovery_options::Type", tags = "100, 101")]
pub r#type: ::core::option::Option<files_recovery_options::Type>,
}
pub mod files_recovery_options {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Overwrite {
Unspecified = 0,
All = 1,
Older = 2,
None = 3,
}
impl Overwrite {
pub fn as_str_name(&self) -> &'static str {
match self {
Overwrite::Unspecified => "OVERWRITE_UNSPECIFIED",
Overwrite::All => "OVERWRITE_ALL",
Overwrite::Older => "OVERWRITE_OLDER",
Overwrite::None => "OVERWRITE_NONE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"OVERWRITE_UNSPECIFIED" => Some(Self::Unspecified),
"OVERWRITE_ALL" => Some(Self::All),
"OVERWRITE_OLDER" => Some(Self::Older),
"OVERWRITE_NONE" => Some(Self::None),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Type {
#[prost(message, tag = "100")]
Original(super::TargetPathOriginal),
#[prost(message, tag = "101")]
Custom(super::TargetPathCustom),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartFilesRecoveryRequest {
#[prost(string, tag = "1")]
pub compute_instance_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub backup_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub opts: ::core::option::Option<FilesRecoveryOptions>,
#[prost(string, repeated, tag = "4")]
pub source_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartFilesRecoveryMetadata {
#[prost(double, tag = "1")]
pub progress_percentage: f64,
#[prost(string, tag = "2")]
pub compute_instance_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub backup_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "4")]
pub source_ids: ::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 compute_instance_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub backup_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteBackupMetadata {
#[prost(string, tag = "1")]
pub compute_instance_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub backup_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteArchiveRequest {
#[prost(string, tag = "1")]
pub archive_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub folder_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub instance_id: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub policy_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteArchiveMetadata {
#[prost(string, tag = "1")]
pub archive_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub folder_id: ::prost::alloc::string::String,
}
pub mod backup_service_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 BackupServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl BackupServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> BackupServiceClient<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,
) -> BackupServiceClient<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,
{
BackupServiceClient::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 list(
&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(
"/yandex.cloud.backup.v1.BackupService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("yandex.cloud.backup.v1.BackupService", "List"));
self.inner.unary(req, path, codec).await
}
pub async fn list_archives(
&mut self,
request: impl tonic::IntoRequest<super::ListArchivesRequest>,
) -> std::result::Result<
tonic::Response<super::ListArchivesResponse>,
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(
"/yandex.cloud.backup.v1.BackupService/ListArchives",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.backup.v1.BackupService",
"ListArchives",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_files(
&mut self,
request: impl tonic::IntoRequest<super::ListFilesRequest>,
) -> std::result::Result<
tonic::Response<super::ListFilesResponse>,
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(
"/yandex.cloud.backup.v1.BackupService/ListFiles",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.backup.v1.BackupService", "ListFiles"),
);
self.inner.unary(req, path, codec).await
}
pub async fn get(
&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(
"/yandex.cloud.backup.v1.BackupService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("yandex.cloud.backup.v1.BackupService", "Get"));
self.inner.unary(req, path, codec).await
}
pub async fn start_recovery(
&mut self,
request: impl tonic::IntoRequest<super::StartRecoveryRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::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(
"/yandex.cloud.backup.v1.BackupService/StartRecovery",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.backup.v1.BackupService",
"StartRecovery",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn start_files_recovery(
&mut self,
request: impl tonic::IntoRequest<super::StartFilesRecoveryRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::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(
"/yandex.cloud.backup.v1.BackupService/StartFilesRecovery",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.backup.v1.BackupService",
"StartFilesRecovery",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeleteBackupRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::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(
"/yandex.cloud.backup.v1.BackupService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.backup.v1.BackupService", "Delete"),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete_archive(
&mut self,
request: impl tonic::IntoRequest<super::DeleteArchiveRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::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(
"/yandex.cloud.backup.v1.BackupService/DeleteArchive",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.backup.v1.BackupService",
"DeleteArchive",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPoliciesRequest {
#[prost(string, tag = "1")]
pub folder_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub compute_instance_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPoliciesResponse {
#[prost(message, repeated, tag = "1")]
pub policies: ::prost::alloc::vec::Vec<Policy>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreatePolicyRequest {
#[prost(string, tag = "1")]
pub folder_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub settings: ::core::option::Option<PolicySettings>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreatePolicyMetadata {
#[prost(string, tag = "1")]
pub policy_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPolicyRequest {
#[prost(string, tag = "1")]
pub policy_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdatePolicyRequest {
#[prost(string, tag = "1")]
pub policy_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub settings: ::core::option::Option<PolicySettings>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdatePolicyMetadata {
#[prost(string, tag = "1")]
pub policy_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeletePolicyRequest {
#[prost(string, tag = "1")]
pub policy_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeletePolicyMetadata {
#[prost(string, tag = "1")]
pub policy_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApplyPolicyRequest {
#[prost(string, tag = "1")]
pub policy_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub compute_instance_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApplyPolicyMetadata {
#[prost(string, tag = "1")]
pub policy_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub compute_instance_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListApplicationsRequest {
#[prost(bool, tag = "4")]
pub show_processing: bool,
#[prost(oneof = "list_applications_request::Id", tags = "1, 2, 3")]
pub id: ::core::option::Option<list_applications_request::Id>,
}
pub mod list_applications_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Id {
#[prost(string, tag = "1")]
FolderId(::prost::alloc::string::String),
#[prost(string, tag = "2")]
PolicyId(::prost::alloc::string::String),
#[prost(string, tag = "3")]
ComputeInstanceId(::prost::alloc::string::String),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListApplicationsResponse {
#[prost(message, repeated, tag = "1")]
pub applications: ::prost::alloc::vec::Vec<PolicyApplication>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecuteRequest {
#[prost(string, tag = "1")]
pub policy_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub compute_instance_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecuteMetadata {
#[prost(string, tag = "1")]
pub policy_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub compute_instance_id: ::prost::alloc::string::String,
#[prost(double, tag = "3")]
pub progress_percentage: f64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RevokeRequest {
#[prost(string, tag = "1")]
pub policy_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub compute_instance_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RevokeMetadata {
#[prost(string, tag = "1")]
pub policy_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub compute_instance_id: ::prost::alloc::string::String,
}
pub mod policy_service_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 PolicyServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl PolicyServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> PolicyServiceClient<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,
) -> PolicyServiceClient<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,
{
PolicyServiceClient::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 list(
&mut self,
request: impl tonic::IntoRequest<super::ListPoliciesRequest>,
) -> std::result::Result<
tonic::Response<super::ListPoliciesResponse>,
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(
"/yandex.cloud.backup.v1.PolicyService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("yandex.cloud.backup.v1.PolicyService", "List"));
self.inner.unary(req, path, codec).await
}
pub async fn create(
&mut self,
request: impl tonic::IntoRequest<super::CreatePolicyRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::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(
"/yandex.cloud.backup.v1.PolicyService/Create",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.backup.v1.PolicyService", "Create"),
);
self.inner.unary(req, path, codec).await
}
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::GetPolicyRequest>,
) -> std::result::Result<tonic::Response<super::Policy>, 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(
"/yandex.cloud.backup.v1.PolicyService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("yandex.cloud.backup.v1.PolicyService", "Get"));
self.inner.unary(req, path, codec).await
}
pub async fn update(
&mut self,
request: impl tonic::IntoRequest<super::UpdatePolicyRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::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(
"/yandex.cloud.backup.v1.PolicyService/Update",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.backup.v1.PolicyService", "Update"),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeletePolicyRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::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(
"/yandex.cloud.backup.v1.PolicyService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.backup.v1.PolicyService", "Delete"),
);
self.inner.unary(req, path, codec).await
}
pub async fn apply(
&mut self,
request: impl tonic::IntoRequest<super::ApplyPolicyRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::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(
"/yandex.cloud.backup.v1.PolicyService/Apply",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.backup.v1.PolicyService", "Apply"),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_applications(
&mut self,
request: impl tonic::IntoRequest<super::ListApplicationsRequest>,
) -> std::result::Result<
tonic::Response<super::ListApplicationsResponse>,
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(
"/yandex.cloud.backup.v1.PolicyService/ListApplications",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.backup.v1.PolicyService",
"ListApplications",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn execute(
&mut self,
request: impl tonic::IntoRequest<super::ExecuteRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::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(
"/yandex.cloud.backup.v1.PolicyService/Execute",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.backup.v1.PolicyService", "Execute"),
);
self.inner.unary(req, path, codec).await
}
pub async fn revoke(
&mut self,
request: impl tonic::IntoRequest<super::RevokeRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::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(
"/yandex.cloud.backup.v1.PolicyService/Revoke",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.backup.v1.PolicyService", "Revoke"),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActivateProviderRequest {
#[prost(string, tag = "1")]
pub folder_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
#[prost(bool, tag = "4")]
pub skip_default_policy: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActivateProviderMetadata {
#[prost(string, tag = "1")]
pub folder_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListActivatedProvidersRequest {
#[prost(string, tag = "1")]
pub folder_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListActivatedProvidersResponse {
#[prost(string, tag = "1")]
pub folder_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
pub mod provider_service_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 ProviderServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl ProviderServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> ProviderServiceClient<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,
) -> ProviderServiceClient<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,
{
ProviderServiceClient::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 activate(
&mut self,
request: impl tonic::IntoRequest<super::ActivateProviderRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::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(
"/yandex.cloud.backup.v1.ProviderService/Activate",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.backup.v1.ProviderService", "Activate"),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_activated(
&mut self,
request: impl tonic::IntoRequest<super::ListActivatedProvidersRequest>,
) -> std::result::Result<
tonic::Response<super::ListActivatedProvidersResponse>,
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(
"/yandex.cloud.backup.v1.ProviderService/ListActivated",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.backup.v1.ProviderService",
"ListActivated",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListResourcesRequest {
#[prost(string, tag = "1")]
pub folder_id: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub page_size: i64,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
#[prost(enumeration = "ResourceType", tag = "4")]
pub r#type: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListResourcesResponse {
#[prost(message, repeated, tag = "1")]
pub resources: ::prost::alloc::vec::Vec<Resource>,
#[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 GetResourceRequest {
#[prost(string, tag = "1")]
pub compute_instance_id: ::prost::alloc::string::String,
#[prost(bool, tag = "2")]
pub include_tenant_info: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetResourceResponse {
#[prost(message, optional, tag = "1")]
pub resource: ::core::option::Option<Resource>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteResourceRequest {
#[prost(string, tag = "1")]
pub compute_instance_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub resource_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteResourceMetadata {
#[prost(string, tag = "1")]
pub compute_instance_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListTasksRequest {
#[prost(string, tag = "1")]
pub compute_instance_id: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub page_size: i64,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListTasksResponse {
#[prost(message, repeated, tag = "1")]
pub tasks: ::prost::alloc::vec::Vec<Task>,
#[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 ListDirectoryRequest {
#[prost(string, tag = "1")]
pub folder_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub compute_instance_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub path: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDirectoryResponse {
#[prost(message, repeated, tag = "1")]
pub items: ::prost::alloc::vec::Vec<list_directory_response::FilesystemItem>,
}
pub mod list_directory_response {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FilesystemItem {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(enumeration = "filesystem_item::Type", tag = "2")]
pub r#type: i32,
#[prost(enumeration = "filesystem_item::Type", tag = "3")]
pub file_type: i32,
#[prost(int64, tag = "4")]
pub size: i64,
}
pub mod filesystem_item {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
Unspecified = 0,
Volume = 1,
Directory = 2,
File = 3,
}
impl Type {
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::Volume => "VOLUME",
Type::Directory => "DIRECTORY",
Type::File => "FILE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"VOLUME" => Some(Self::Volume),
"DIRECTORY" => Some(Self::Directory),
"FILE" => Some(Self::File),
_ => None,
}
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDirectoryRequest {
#[prost(string, tag = "1")]
pub folder_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub compute_instance_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub path: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDirectoryMetadata {
#[prost(string, tag = "1")]
pub compute_instance_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub path: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListResourceOperationsRequest {
#[prost(string, tag = "1")]
pub compute_instance_id: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub page_size: i64,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListResourceOperationsResponse {
#[prost(message, repeated, tag = "1")]
pub operations: ::prost::alloc::vec::Vec<super::super::operation::Operation>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
pub mod resource_service_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 ResourceServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl ResourceServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> ResourceServiceClient<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,
) -> ResourceServiceClient<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,
{
ResourceServiceClient::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 list(
&mut self,
request: impl tonic::IntoRequest<super::ListResourcesRequest>,
) -> std::result::Result<
tonic::Response<super::ListResourcesResponse>,
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(
"/yandex.cloud.backup.v1.ResourceService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.backup.v1.ResourceService", "List"),
);
self.inner.unary(req, path, codec).await
}
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::GetResourceRequest>,
) -> std::result::Result<
tonic::Response<super::GetResourceResponse>,
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(
"/yandex.cloud.backup.v1.ResourceService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.backup.v1.ResourceService", "Get"),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeleteResourceRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::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(
"/yandex.cloud.backup.v1.ResourceService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.backup.v1.ResourceService", "Delete"),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_tasks(
&mut self,
request: impl tonic::IntoRequest<super::ListTasksRequest>,
) -> std::result::Result<
tonic::Response<super::ListTasksResponse>,
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(
"/yandex.cloud.backup.v1.ResourceService/ListTasks",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.backup.v1.ResourceService",
"ListTasks",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_directory(
&mut self,
request: impl tonic::IntoRequest<super::ListDirectoryRequest>,
) -> std::result::Result<
tonic::Response<super::ListDirectoryResponse>,
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(
"/yandex.cloud.backup.v1.ResourceService/ListDirectory",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.backup.v1.ResourceService",
"ListDirectory",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn create_directory(
&mut self,
request: impl tonic::IntoRequest<super::CreateDirectoryRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::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(
"/yandex.cloud.backup.v1.ResourceService/CreateDirectory",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.backup.v1.ResourceService",
"CreateDirectory",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_operations(
&mut self,
request: impl tonic::IntoRequest<super::ListResourceOperationsRequest>,
) -> std::result::Result<
tonic::Response<super::ListResourceOperationsResponse>,
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(
"/yandex.cloud.backup.v1.ResourceService/ListOperations",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.backup.v1.ResourceService",
"ListOperations",
),
);
self.inner.unary(req, path, codec).await
}
}
}