/// A ClickHouse Backup resource. See the [Developer's Guide](/docs/managed-clickhouse/concepts)
/// for more information.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Backup {
/// ID of the backup.
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// ID of the folder that the backup belongs to.
#[prost(string, tag = "2")]
pub folder_id: ::prost::alloc::string::String,
/// Creation timestamp in \[RFC3339\](<https://www.ietf.org/rfc/rfc3339.txt>) text format
/// (i.e. when the backup operation was completed).
#[prost(message, optional, tag = "3")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
/// ID of the ClickHouse cluster that the backup was created for.
#[prost(string, tag = "4")]
pub source_cluster_id: ::prost::alloc::string::String,
/// Names of the shards included in the backup.
#[prost(string, repeated, tag = "6")]
pub source_shard_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Time when the backup operation was started.
#[prost(message, optional, tag = "5")]
pub started_at: ::core::option::Option<::prost_types::Timestamp>,
/// Size of backup in bytes.
#[prost(int64, tag = "7")]
pub size: i64,
/// How this backup was created (manual/automatic/etc...).
#[prost(enumeration = "backup::BackupType", tag = "8")]
pub r#type: i32,
}
/// Nested message and enum types in `Backup`.
pub mod backup {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum BackupType {
Unspecified = 0,
/// Backup created by automated daily schedule.
Automated = 1,
/// Backup created by user request.
Manual = 2,
}
impl BackupType {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
BackupType::Unspecified => "BACKUP_TYPE_UNSPECIFIED",
BackupType::Automated => "AUTOMATED",
BackupType::Manual => "MANUAL",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"BACKUP_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"AUTOMATED" => Some(Self::Automated),
"MANUAL" => Some(Self::Manual),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBackupRequest {
/// ID of the backup to return information about.
/// To get the backup ID, use a \[ClusterService.ListBackups\] request.
#[prost(string, tag = "1")]
pub backup_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBackupsRequest {
/// ID of the folder to list backups in.
/// To get the folder ID, use a \[yandex.cloud.resourcemanager.v1.FolderService.List\] request.
#[prost(string, tag = "1")]
pub folder_id: ::prost::alloc::string::String,
/// The maximum number of results per page to return. If the number of available
/// results is larger than \[page_size\], the service returns a \[ListBackupsResponse.next_page_token\]
/// that can be used to get the next page of results in subsequent list requests.
#[prost(int64, tag = "2")]
pub page_size: i64,
/// Page token. To get the next page of results, set \[page_token\] to the \[ListBackupsResponse.next_page_token\]
/// returned by the previous list request.
#[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 ListBackupsResponse {
/// List of Backup resources.
#[prost(message, repeated, tag = "1")]
pub backups: ::prost::alloc::vec::Vec<Backup>,
/// This token allows you to get the next page of results for list requests. If the number of results
/// is larger than \[ListBackupsRequest.page_size\], use the \[next_page_token\] as the value
/// for the \[ListBackupsRequest.page_token\] parameter in the next list request. Each subsequent
/// list request will have its own \[next_page_token\] to continue paging through the results.
#[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 DeleteBackupRequest {
/// Required. ID of the backup to delete.
#[prost(string, tag = "1")]
pub backup_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteBackupMetadata {
/// Required. ID of the ClickHouse backup that is currently being deleted.
#[prost(string, tag = "1")]
pub backup_id: ::prost::alloc::string::String,
/// ID of the ClickHouse backup that is being deleted.
#[prost(string, tag = "2")]
pub cluster_id: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod backup_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// A set of methods for managing ClickHouse Backup resources.
#[derive(Debug, Clone)]
pub struct BackupServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl BackupServiceClient<tonic::transport::Channel> {
/// Attempt to create a new client by connecting to a given endpoint.
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))
}
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Limits the maximum size of a decoded message.
///
/// Default: `4MB`
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
/// Limits the maximum size of an encoded message.
///
/// Default: `usize::MAX`
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// Returns the specified ClickHouse Backup resource.
///
/// To get the list of available ClickHouse Backup resources, make a [List] request.
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.mdb.clickhouse.v1.BackupService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.BackupService",
"Get",
),
);
self.inner.unary(req, path, codec).await
}
/// Retrieves the list of Backup resources available for the specified folder.
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.mdb.clickhouse.v1.BackupService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.BackupService",
"List",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes the specified ClickHouse Backup.
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeleteBackupRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.BackupService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.BackupService",
"Delete",
),
);
self.inner.unary(req, path, codec).await
}
}
}
/// A maintenance window settings.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MaintenanceWindow {
/// The maintenance policy in effect.
#[prost(oneof = "maintenance_window::Policy", tags = "1, 2")]
pub policy: ::core::option::Option<maintenance_window::Policy>,
}
/// Nested message and enum types in `MaintenanceWindow`.
pub mod maintenance_window {
/// The maintenance policy in effect.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Policy {
/// Maintenance operation can be scheduled anytime.
#[prost(message, tag = "1")]
Anytime(super::AnytimeMaintenanceWindow),
/// Maintenance operation can be scheduled on a weekly basis.
#[prost(message, tag = "2")]
WeeklyMaintenanceWindow(super::WeeklyMaintenanceWindow),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AnytimeMaintenanceWindow {}
/// Weelky maintenance window settings.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WeeklyMaintenanceWindow {
/// Day of the week (in `DDD` format).
#[prost(enumeration = "weekly_maintenance_window::WeekDay", tag = "1")]
pub day: i32,
/// Hour of the day in UTC (in `HH` format).
#[prost(int64, tag = "2")]
pub hour: i64,
}
/// Nested message and enum types in `WeeklyMaintenanceWindow`.
pub mod weekly_maintenance_window {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum WeekDay {
Unspecified = 0,
Mon = 1,
Tue = 2,
Wed = 3,
Thu = 4,
Fri = 5,
Sat = 6,
Sun = 7,
}
impl WeekDay {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
WeekDay::Unspecified => "WEEK_DAY_UNSPECIFIED",
WeekDay::Mon => "MON",
WeekDay::Tue => "TUE",
WeekDay::Wed => "WED",
WeekDay::Thu => "THU",
WeekDay::Fri => "FRI",
WeekDay::Sat => "SAT",
WeekDay::Sun => "SUN",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"WEEK_DAY_UNSPECIFIED" => Some(Self::Unspecified),
"MON" => Some(Self::Mon),
"TUE" => Some(Self::Tue),
"WED" => Some(Self::Wed),
"THU" => Some(Self::Thu),
"FRI" => Some(Self::Fri),
"SAT" => Some(Self::Sat),
"SUN" => Some(Self::Sun),
_ => None,
}
}
}
}
/// A planned maintenance operation.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MaintenanceOperation {
/// Information about this maintenance operation.
#[prost(string, tag = "1")]
pub info: ::prost::alloc::string::String,
/// Time until which this maintenance operation is delayed.
#[prost(message, optional, tag = "2")]
pub delayed_until: ::core::option::Option<::prost_types::Timestamp>,
}
/// A ClickHouse Cluster resource. For more information, see the
/// \[Cluster\](/docs/managed-clickhouse/concepts) section in the Developer's Guide.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Cluster {
/// ID of the ClickHouse cluster.
/// This ID is assigned by MDB at creation time.
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// ID of the folder that the ClickHouse cluster belongs to.
#[prost(string, tag = "2")]
pub folder_id: ::prost::alloc::string::String,
/// Creation timestamp in \[RFC3339\](<https://www.ietf.org/rfc/rfc3339.txt>) text format.
#[prost(message, optional, tag = "3")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
/// Name of the ClickHouse cluster.
/// The name is unique within the folder. 1-63 characters long.
#[prost(string, tag = "4")]
pub name: ::prost::alloc::string::String,
/// Description of the ClickHouse cluster. 0-256 characters long.
#[prost(string, tag = "5")]
pub description: ::prost::alloc::string::String,
/// Custom labels for the ClickHouse cluster as `key:value` pairs. Maximum 64 per resource.
#[prost(map = "string, string", tag = "6")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Deployment environment of the ClickHouse cluster.
#[prost(enumeration = "cluster::Environment", tag = "7")]
pub environment: i32,
/// Description of monitoring systems relevant to the ClickHouse cluster.
#[prost(message, repeated, tag = "8")]
pub monitoring: ::prost::alloc::vec::Vec<Monitoring>,
/// Configuration of the ClickHouse cluster.
#[prost(message, optional, tag = "9")]
pub config: ::core::option::Option<ClusterConfig>,
/// ID of the network that the cluster belongs to.
#[prost(string, tag = "10")]
pub network_id: ::prost::alloc::string::String,
/// Aggregated cluster health.
#[prost(enumeration = "cluster::Health", tag = "11")]
pub health: i32,
/// Current state of the cluster.
#[prost(enumeration = "cluster::Status", tag = "12")]
pub status: i32,
/// ID of the service account used for access to Object Storage.
#[prost(string, tag = "13")]
pub service_account_id: ::prost::alloc::string::String,
/// Maintenance window for the cluster.
#[prost(message, optional, tag = "14")]
pub maintenance_window: ::core::option::Option<MaintenanceWindow>,
/// Planned maintenance operation to be started for the cluster within the nearest \[maintenance_window\].
#[prost(message, optional, tag = "15")]
pub planned_operation: ::core::option::Option<MaintenanceOperation>,
/// User security groups
#[prost(string, repeated, tag = "16")]
pub security_group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Deletion Protection inhibits deletion of the cluster
#[prost(bool, tag = "17")]
pub deletion_protection: bool,
}
/// Nested message and enum types in `Cluster`.
pub mod cluster {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Environment {
Unspecified = 0,
/// Stable environment with a conservative update policy:
/// only hotfixes are applied during regular maintenance.
Production = 1,
/// Environment with more aggressive update policy: new versions
/// are rolled out irrespective of backward compatibility.
Prestable = 2,
}
impl Environment {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Environment::Unspecified => "ENVIRONMENT_UNSPECIFIED",
Environment::Production => "PRODUCTION",
Environment::Prestable => "PRESTABLE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ENVIRONMENT_UNSPECIFIED" => Some(Self::Unspecified),
"PRODUCTION" => Some(Self::Production),
"PRESTABLE" => Some(Self::Prestable),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Health {
/// State of the cluster is unknown (\[Host.health\] for every host in the cluster is UNKNOWN).
Unknown = 0,
/// Cluster is alive and well (\[Host.health\] for every host in the cluster is ALIVE).
Alive = 1,
/// Cluster is inoperable (\[Host.health\] for every host in the cluster is DEAD).
Dead = 2,
/// Cluster is working below capacity (\[Host.health\] for at least one host in the cluster is not ALIVE).
Degraded = 3,
}
impl Health {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Health::Unknown => "HEALTH_UNKNOWN",
Health::Alive => "ALIVE",
Health::Dead => "DEAD",
Health::Degraded => "DEGRADED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"HEALTH_UNKNOWN" => Some(Self::Unknown),
"ALIVE" => Some(Self::Alive),
"DEAD" => Some(Self::Dead),
"DEGRADED" => Some(Self::Degraded),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Status {
/// Cluster state is unknown.
Unknown = 0,
/// Cluster is being created.
Creating = 1,
/// Cluster is running normally.
Running = 2,
/// Cluster encountered a problem and cannot operate.
Error = 3,
/// Cluster is being updated.
Updating = 4,
/// Cluster is stopping.
Stopping = 5,
/// Cluster stopped.
Stopped = 6,
/// Cluster is starting.
Starting = 7,
}
impl Status {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Status::Unknown => "STATUS_UNKNOWN",
Status::Creating => "CREATING",
Status::Running => "RUNNING",
Status::Error => "ERROR",
Status::Updating => "UPDATING",
Status::Stopping => "STOPPING",
Status::Stopped => "STOPPED",
Status::Starting => "STARTING",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATUS_UNKNOWN" => Some(Self::Unknown),
"CREATING" => Some(Self::Creating),
"RUNNING" => Some(Self::Running),
"ERROR" => Some(Self::Error),
"UPDATING" => Some(Self::Updating),
"STOPPING" => Some(Self::Stopping),
"STOPPED" => Some(Self::Stopped),
"STARTING" => Some(Self::Starting),
_ => None,
}
}
}
}
/// Monitoring system metadata.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Monitoring {
/// Name of the monitoring system.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Description of the monitoring system.
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
/// Link to the monitoring system charts for the ClickHouse cluster.
#[prost(string, tag = "3")]
pub link: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClusterConfig {
/// Version of the ClickHouse server software.
#[prost(string, tag = "1")]
pub version: ::prost::alloc::string::String,
/// Configuration and resource allocation for ClickHouse hosts.
#[prost(message, optional, tag = "2")]
pub clickhouse: ::core::option::Option<cluster_config::Clickhouse>,
/// Configuration and resource allocation for ZooKeeper hosts.
#[prost(message, optional, tag = "3")]
pub zookeeper: ::core::option::Option<cluster_config::Zookeeper>,
/// Time to start the daily backup, in the UTC timezone.
#[prost(message, optional, tag = "4")]
pub backup_window_start: ::core::option::Option<
super::super::super::super::super::google::r#type::TimeOfDay,
>,
/// Access policy for external services.
#[prost(message, optional, tag = "5")]
pub access: ::core::option::Option<Access>,
#[prost(message, optional, tag = "6")]
pub cloud_storage: ::core::option::Option<CloudStorage>,
/// Whether database management through SQL commands is enabled.
#[prost(message, optional, tag = "7")]
pub sql_database_management: ::core::option::Option<bool>,
/// Whether user management through SQL commands is enabled.
#[prost(message, optional, tag = "8")]
pub sql_user_management: ::core::option::Option<bool>,
/// Whether cluster should use embedded Keeper instead of Zookeeper.
#[prost(message, optional, tag = "9")]
pub embedded_keeper: ::core::option::Option<bool>,
/// Retain period of automatically created backup in days
#[prost(message, optional, tag = "10")]
pub backup_retain_period_days: ::core::option::Option<i64>,
}
/// Nested message and enum types in `ClusterConfig`.
pub mod cluster_config {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Clickhouse {
/// Configuration settings of a ClickHouse server.
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::ClickhouseConfigSet>,
/// Resources allocated to ClickHouse hosts.
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Zookeeper {
/// Resources allocated to ZooKeeper hosts.
#[prost(message, optional, tag = "1")]
pub resources: ::core::option::Option<super::Resources>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Shard {
/// Name of the shard.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// ID of the cluster that the shard belongs to.
#[prost(string, tag = "2")]
pub cluster_id: ::prost::alloc::string::String,
/// Configuration of the shard.
#[prost(message, optional, tag = "3")]
pub config: ::core::option::Option<ShardConfig>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Shards {
#[prost(message, repeated, tag = "1")]
pub shards: ::prost::alloc::vec::Vec<Shard>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ShardGroup {
/// Name of the shard group.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// ID of the ClickHouse cluster that the shard group belongs to.
#[prost(string, tag = "2")]
pub cluster_id: ::prost::alloc::string::String,
/// Description of the shard group. 0-256 characters long.
#[prost(string, tag = "3")]
pub description: ::prost::alloc::string::String,
/// List of shard names contained in the shard group.
#[prost(string, repeated, tag = "4")]
pub shard_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ShardConfig {
/// ClickHouse configuration for a shard.
#[prost(message, optional, tag = "1")]
pub clickhouse: ::core::option::Option<shard_config::Clickhouse>,
}
/// Nested message and enum types in `ShardConfig`.
pub mod shard_config {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Clickhouse {
/// ClickHouse settings for a shard.
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::ClickhouseConfigSet>,
/// Computational resources for a shard.
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
/// Relative weight of a shard considered when writing data to the cluster.
/// For details, see [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/table_engines/distributed/>).
#[prost(message, optional, tag = "3")]
pub weight: ::core::option::Option<i64>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Host {
/// Name of the ClickHouse host. The host name is assigned by MDB at creation time, and cannot be changed.
/// 1-63 characters long.
///
/// The name is unique across all MDB hosts that exist on the platform, as it defines the FQDN of the host.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// ID of the ClickHouse host. The ID is assigned by MDB at creation time.
#[prost(string, tag = "2")]
pub cluster_id: ::prost::alloc::string::String,
/// ID of the availability zone where the ClickHouse host resides.
#[prost(string, tag = "3")]
pub zone_id: ::prost::alloc::string::String,
/// Type of the host. If the field has default value, it is not returned in the response.
#[prost(enumeration = "host::Type", tag = "4")]
pub r#type: i32,
/// Resources allocated to the ClickHouse host.
#[prost(message, optional, tag = "5")]
pub resources: ::core::option::Option<Resources>,
/// Aggregated health of the host. If the field has default value, it is not returned in the response.
#[prost(enumeration = "host::Health", tag = "6")]
pub health: i32,
/// Services provided by the host.
#[prost(message, repeated, tag = "7")]
pub services: ::prost::alloc::vec::Vec<Service>,
/// ID of the subnet that the host belongs to.
#[prost(string, tag = "8")]
pub subnet_id: ::prost::alloc::string::String,
/// Flag showing public IP assignment status to this host.
#[prost(bool, tag = "9")]
pub assign_public_ip: bool,
#[prost(string, tag = "10")]
pub shard_name: ::prost::alloc::string::String,
}
/// Nested message and enum types in `Host`.
pub mod host {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
/// Host type is unspecified. Default value.
Unspecified = 0,
/// ClickHouse host.
Clickhouse = 1,
/// ZooKeeper host.
Zookeeper = 2,
}
impl Type {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::Clickhouse => "CLICKHOUSE",
Type::Zookeeper => "ZOOKEEPER",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"CLICKHOUSE" => Some(Self::Clickhouse),
"ZOOKEEPER" => Some(Self::Zookeeper),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Health {
/// Health of the host is unknown.
Unknown = 0,
/// The host is performing all its functions normally.
Alive = 1,
/// The host is inoperable, and cannot perform any of its essential functions.
Dead = 2,
/// The host is degraded, and can perform only some of its essential functions.
Degraded = 3,
}
impl Health {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Health::Unknown => "UNKNOWN",
Health::Alive => "ALIVE",
Health::Dead => "DEAD",
Health::Degraded => "DEGRADED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNKNOWN" => Some(Self::Unknown),
"ALIVE" => Some(Self::Alive),
"DEAD" => Some(Self::Dead),
"DEGRADED" => Some(Self::Degraded),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Service {
/// Type of the service provided by the host. If the field has default value, it is not returned in the response.
#[prost(enumeration = "service::Type", tag = "1")]
pub r#type: i32,
/// Aggregated health of the service. If the field has default value, it is not returned in the response.
#[prost(enumeration = "service::Health", tag = "2")]
pub health: i32,
}
/// Nested message and enum types in `Service`.
pub mod service {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
/// Service type of the host is unspecified. Default value.
Unspecified = 0,
/// The host is a ClickHouse server.
Clickhouse = 1,
/// The host is a ZooKeeper server.
Zookeeper = 2,
}
impl Type {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::Clickhouse => "CLICKHOUSE",
Type::Zookeeper => "ZOOKEEPER",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"CLICKHOUSE" => Some(Self::Clickhouse),
"ZOOKEEPER" => Some(Self::Zookeeper),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Health {
/// Health of the server is unknown. Default value.
Unknown = 0,
/// The server is working normally.
Alive = 1,
/// The server is dead or unresponsive.
Dead = 2,
}
impl Health {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Health::Unknown => "UNKNOWN",
Health::Alive => "ALIVE",
Health::Dead => "DEAD",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNKNOWN" => Some(Self::Unknown),
"ALIVE" => Some(Self::Alive),
"DEAD" => Some(Self::Dead),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Resources {
/// ID of the preset for computational resources available to a host (CPU, memory etc.).
/// All available presets are listed in the \[documentation\](/docs/managed-clickhouse/concepts/instance-types)
#[prost(string, tag = "1")]
pub resource_preset_id: ::prost::alloc::string::String,
/// Volume of the storage available to a host, in bytes.
#[prost(int64, tag = "2")]
pub disk_size: i64,
/// Type of the storage environment for the host.
/// Possible values:
/// * network-hdd - network HDD drive,
/// * network-ssd - network SSD drive,
/// * local-ssd - local SSD storage.
#[prost(string, tag = "3")]
pub disk_type_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Access {
/// Allow to export data from the cluster to DataLens.
#[prost(bool, tag = "1")]
pub data_lens: bool,
/// Allow SQL queries to the cluster databases from the management console.
///
/// See [SQL queries in the management console](/docs/managed-clickhouse/operations/web-sql-query) for more details.
#[prost(bool, tag = "2")]
pub web_sql: bool,
/// Allow to import data from Yandex Metrica and AppMetrica to the cluster.
///
/// See [AppMetrica documentation](<https://appmetrica.yandex.com/docs/cloud/index.html>) for more details.
#[prost(bool, tag = "3")]
pub metrika: bool,
/// Allow access to cluster for Serverless.
#[prost(bool, tag = "4")]
pub serverless: bool,
/// Allow access for DataTransfer
#[prost(bool, tag = "5")]
pub data_transfer: bool,
/// Allow access for Query
#[prost(bool, tag = "6")]
pub yandex_query: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CloudStorage {
/// Whether to use Object Storage for storing ClickHouse data.
#[prost(bool, tag = "1")]
pub enabled: bool,
#[prost(message, optional, tag = "2")]
pub move_factor: ::core::option::Option<f64>,
#[prost(message, optional, tag = "3")]
pub data_cache_enabled: ::core::option::Option<bool>,
#[prost(message, optional, tag = "4")]
pub data_cache_max_size: ::core::option::Option<i64>,
#[prost(message, optional, tag = "5")]
pub prefer_not_to_merge: ::core::option::Option<bool>,
}
/// A ClickHouse Database resource. For more information, see the
/// [Developer's Guide](/docs/managed-clickhouse/concepts).
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Database {
/// Name of the database.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// ID of the ClickHouse cluster that the database belongs to.
#[prost(string, tag = "2")]
pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DatabaseSpec {
/// Name of the ClickHouse database. 1-63 characters long.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
/// A ClickHouse User resource. For more information, see
/// the [Developer's guide](/docs/managed-clickhouse/concepts).
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct User {
/// Name of the ClickHouse user.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// ID of the ClickHouse cluster the user belongs to.
#[prost(string, tag = "2")]
pub cluster_id: ::prost::alloc::string::String,
/// Set of permissions granted to the user.
#[prost(message, repeated, tag = "3")]
pub permissions: ::prost::alloc::vec::Vec<Permission>,
#[prost(message, optional, tag = "4")]
pub settings: ::core::option::Option<UserSettings>,
/// Set of quotas assigned to the user.
#[prost(message, repeated, tag = "5")]
pub quotas: ::prost::alloc::vec::Vec<UserQuota>,
/// Connection Manager connection configuration. Read only field.
#[prost(message, optional, tag = "6")]
pub connection_manager: ::core::option::Option<ConnectionManager>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Permission {
/// Name of the database that the permission grants access to.
#[prost(string, tag = "1")]
pub database_name: ::prost::alloc::string::String,
}
/// Connection Manager connection configuration.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConnectionManager {
/// ID of Connection Manager connection.
#[prost(string, tag = "1")]
pub connection_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserSpec {
/// Name of the ClickHouse user.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Password of the ClickHouse user.
#[prost(string, tag = "2")]
pub password: ::prost::alloc::string::String,
/// Set of permissions to grant to the user. If not set, it's granted permissions to access all databases.
#[prost(message, repeated, tag = "3")]
pub permissions: ::prost::alloc::vec::Vec<Permission>,
#[prost(message, optional, tag = "4")]
pub settings: ::core::option::Option<UserSettings>,
/// Set of quotas assigned to the user.
#[prost(message, repeated, tag = "5")]
pub quotas: ::prost::alloc::vec::Vec<UserQuota>,
/// Generate password using Connection Manager.
#[prost(message, optional, tag = "6")]
pub generate_password: ::core::option::Option<bool>,
}
/// ClickHouse user settings. Supported settings are a limited subset of all settings
/// described in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/>).
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserSettings {
/// Restricts permissions for non-DDL queries. To restrict permissions for DDL queries, use \[allow_ddl\] instead.
/// * **0** (default)-no restrictions.
/// * **1**-only read data queries are allowed.
/// * **2**-read data and change settings queries are allowed.
///
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/permissions-for-queries/#settings_readonly>).
#[prost(message, optional, tag = "1")]
pub readonly: ::core::option::Option<i64>,
/// Determines whether DDL queries are allowed (e.g., **CREATE**, **ALTER**, **RENAME**, etc).
///
/// Default value: **true**.
///
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/permissions-for-queries/#settings_allow_ddl>).
#[prost(message, optional, tag = "2")]
pub allow_ddl: ::core::option::Option<bool>,
/// Enables [introspections functions](<https://clickhouse.com/docs/en/sql-reference/functions/introspection>) for query profiling.
///
/// More info see in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#settings-allow_introspection_functions>).
#[prost(message, optional, tag = "96")]
pub allow_introspection_functions: ::core::option::Option<bool>,
/// Connection timeout in milliseconds.
///
/// Value must be greater than **0** (default: **10000**, 10 seconds).
#[prost(message, optional, tag = "39")]
pub connect_timeout: ::core::option::Option<i64>,
/// The timeout in milliseconds for connecting to a remote server for a Distributed table engine. Applies only if the cluster uses sharding and replication. If unsuccessful, several attempts are made to connect to various replicas.
///
/// Default value: **50**.
///
/// More info see in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#connect-timeout-with-failover-ms>).
#[prost(message, optional, tag = "97")]
pub connect_timeout_with_failover: ::core::option::Option<i64>,
/// Receive timeout in milliseconds.
///
/// Value must be greater than **0** (default: **300000**, 300 seconds or 5 minutes).
#[prost(message, optional, tag = "40")]
pub receive_timeout: ::core::option::Option<i64>,
/// Send timeout in milliseconds.
///
/// Value must be greater than **0** (default: **300000**, 300 seconds or 5 minutes).
#[prost(message, optional, tag = "41")]
pub send_timeout: ::core::option::Option<i64>,
/// Timeout (in seconds) between checks of execution speed. It is checked that execution speed is not less that specified in \[min_execution_speed\] parameter.
///
/// Default value: **10**.
#[prost(message, optional, tag = "98")]
pub timeout_before_checking_execution_speed: ::core::option::Option<i64>,
/// Enables or disables write quorum for ClickHouse cluster.
/// If the value is less than **2**, then write quorum is disabled, otherwise it is enabled.
///
/// When used, write quorum guarantees that ClickHouse has written data to the quorum of **insert_quorum** replicas with no errors until the \[insert_quorum_timeout\] expires.
/// All replicas in the quorum are in the consistent state, meaning that they contain linearized data from the previous **INSERT** queries.
/// Employ write quorum, if you need the guarantees that the written data would not be lost in case of one or more replicas failure.
///
/// You can use \[select_sequential_consistency\] setting to read the data written with write quorum.
///
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#settings-insert_quorum>).
#[prost(message, optional, tag = "3")]
pub insert_quorum: ::core::option::Option<i64>,
/// Quorum write timeout in milliseconds.
///
/// If the write quorum is enabled in the cluster, this timeout expires and some data is not written to the \[insert_quorum\] replicas, then ClickHouse will abort the execution of **INSERT** query and return an error.
/// In this case, the client must send the query again to write the data block into the same or another replica.
///
/// Minimum value: **1000**, 1 second (default: **60000**, 1 minute).
#[prost(message, optional, tag = "4")]
pub insert_quorum_timeout: ::core::option::Option<i64>,
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#settings-insert_quorum_parallel>).
#[prost(message, optional, tag = "99")]
pub insert_quorum_parallel: ::core::option::Option<bool>,
/// Enables the insertion of default values instead of NULL into columns with not nullable data type.
///
/// Default value: **true**.
///
/// More info see in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#insert_null_as_default>).
#[prost(message, optional, tag = "100")]
pub insert_null_as_default: ::core::option::Option<bool>,
/// Determines the behavior of **SELECT** queries from the replicated table: if enabled, ClickHouse will terminate a query with error message in case the replica does not have a chunk written with the quorum and will not read the parts that have not yet been written with the quorum.
///
/// Default value: **false** (sequential consistency is disabled).
#[prost(message, optional, tag = "5")]
pub select_sequential_consistency: ::core::option::Option<bool>,
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#settings-deduplicate-blocks-in-dependent-materialized-views>).
#[prost(message, optional, tag = "101")]
pub deduplicate_blocks_in_dependent_materialized_views: ::core::option::Option<bool>,
/// Wait mode for asynchronous actions in **ALTER** queries on replicated tables:
///
/// * **0**-do not wait for replicas.
/// * **1**-only wait for own execution (default).
/// * **2**-wait for all replicas.
///
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/sql-reference/statements/alter/#synchronicity-of-alter-queries>).
#[prost(message, optional, tag = "42")]
pub replication_alter_partitions_sync: ::core::option::Option<i64>,
/// Max replica delay in milliseconds. If a replica lags more than the set value, this replica is not used and becomes a stale one.
///
/// Minimum value: **1000**, 1 second (default: **300000**, 300 seconds or 5 minutes).
///
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#settings-max_replica_delay_for_distributed_queries>).
#[prost(message, optional, tag = "6")]
pub max_replica_delay_for_distributed_queries: ::core::option::Option<i64>,
/// Enables or disables query forcing to a stale replica in case the actual data is unavailable.
/// If enabled, ClickHouse will choose the most up-to-date replica and force the query to use the data in this replica.
/// This setting can be used when doing **SELECT** query from a distributed table that points to replicated tables.
///
/// Default value: **true** (query forcing is enabled).
///
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#settings-fallback_to_stale_replicas_for_distributed_queries>).
#[prost(message, optional, tag = "7")]
pub fallback_to_stale_replicas_for_distributed_queries: ::core::option::Option<bool>,
/// Determine the behavior of distributed subqueries.
///
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#distributed-product-mode>).
#[prost(enumeration = "user_settings::DistributedProductMode", tag = "43")]
pub distributed_product_mode: i32,
/// Enables of disables memory saving mode when doing distributed aggregation.
///
/// When ClickHouse works with a distributed query, external aggregation is done on remote servers.
/// Enable this setting to achieve a smaller memory footprint on the server that sourced such a distributed query.
///
/// Default value: **false** (memory saving mode is disabled).
///
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/sql-reference/statements/select/group-by/#select-group-by-in-external-memory>).
#[prost(message, optional, tag = "72")]
pub distributed_aggregation_memory_efficient: ::core::option::Option<bool>,
/// Timeout for DDL queries, in milliseconds.
#[prost(message, optional, tag = "73")]
pub distributed_ddl_task_timeout: ::core::option::Option<i64>,
/// Enables or disables silent skipping of unavailable shards.
///
/// A shard is considered unavailable if all its replicas are also unavailable.
///
/// Default value: **false** (silent skipping is disabled).
///
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#settings-skip_unavailable_shards>).
#[prost(message, optional, tag = "81")]
pub skip_unavailable_shards: ::core::option::Option<bool>,
/// Enables or disables expression compilation.
/// If you execute a lot of queries that contain identical expressions, then enable this setting.
/// As a result, such queries may be executed faster due to use of compiled expressions.
///
/// Use this setting in combination with \[min_count_to_compile_expression\] setting.
///
/// Default value: **false** (expression compilation is disabled).
#[prost(message, optional, tag = "46")]
pub compile_expressions: ::core::option::Option<bool>,
/// How many identical expressions ClickHouse has to encounter before they are compiled.
///
/// Minimum value: **0** (default: **3**).
///
/// For the **0** value compilation is synchronous: a query waits for expression compilation process to complete prior to continuing execution.
/// It is recommended to set this value only for testing purposes.
///
/// For all other values, compilation is asynchronous: the compilation process executes in a separate thread.
/// When a compiled expression is ready, it will be used by ClickHouse for eligible queries, including the ones that are currently running.
#[prost(message, optional, tag = "47")]
pub min_count_to_compile_expression: ::core::option::Option<i64>,
/// The maximum block size for reading.
///
/// Data in ClickHouse is organized and processed by blocks (block is a set of columns' parts).
/// The internal processing cycles for a single block are efficient enough, but there are noticeable expenditures on each block.
///
/// This setting is a recommendation for size of block (in a count of rows) that should be loaded from tables.
///
/// Value must be greater than **0** (default: **65536**).
///
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#setting-max_block_size>).
#[prost(message, optional, tag = "9")]
pub max_block_size: ::core::option::Option<i64>,
/// Limits the minimum number of rows in a block to be inserted in a table by **INSERT** query.
/// Blocks that are smaller than the specified value, will be squashed together into the bigger blocks.
///
/// Minimal value: **0**, block squashing is disabled (default: **1048576**).
#[prost(message, optional, tag = "48")]
pub min_insert_block_size_rows: ::core::option::Option<i64>,
/// Limits the minimum number of bytes in a block to be inserted in a table by **INSERT** query.
/// Blocks that are smaller than the specified value, will be squashed together into the bigger blocks.
///
/// Minimal value: **0**, block squashing is disabled (default: **268435456**, 256 MB).
#[prost(message, optional, tag = "49")]
pub min_insert_block_size_bytes: ::core::option::Option<i64>,
/// Allows to form blocks of the specified size (in bytes) when inserting data in a table.
/// This setting has effect only if server is creating such blocks by itself.
///
/// Value must be greater than **0** (default: **1048576**).
///
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#settings-max_insert_block_size>).
#[prost(message, optional, tag = "10")]
pub max_insert_block_size: ::core::option::Option<i64>,
/// Limits the minimum number of bytes to enable unbuffered direct reads from disk (Direct I/O).
///
/// By default, ClickHouse does not read data directly from disk, but relies on the filesystem and its cache instead.
/// Such reading strategy is effective when the data volume is small.
/// If the amount of the data to read is huge, it is more effective to read directly from the disk, bypassing the filesystem cache.
///
/// If the total amount of the data to read is greater than the value of this setting, then ClickHouse will fetch this data directly from the disk.
///
/// Minimal value and default value: **0**, Direct I/O is disabled.
#[prost(message, optional, tag = "50")]
pub min_bytes_to_use_direct_io: ::core::option::Option<i64>,
/// Determines whether to use the cache of uncompressed blocks, or not.
/// Using this cache can significantly reduce latency and increase the throughput when a huge amount of small queries is to be processed.
/// Enable this setting for the users who instantiates small queries frequently.
///
/// This setting has effect only for tables of the MergeTree family.
///
/// Default value: **false** (uncompressed cache is disabled).
///
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#setting-use_uncompressed_cache>).
#[prost(message, optional, tag = "51")]
pub use_uncompressed_cache: ::core::option::Option<bool>,
/// Limits the maximum size in rows of the request that can use the cache of uncompressed data. The cache is not used for requests larger
/// than the specified value.
///
/// Use this setting in combination with \[use_uncompressed_cache\] setting.
///
/// Value must be greater than **0** (default: **128x8192**).
#[prost(message, optional, tag = "52")]
pub merge_tree_max_rows_to_use_cache: ::core::option::Option<i64>,
/// Limits the maximum size in bytes of the request that can use the cache of uncompressed data. The cache is not used for requests larger
/// than the specified value.
///
/// Use this setting in combination with \[use_uncompressed_cache\] setting.
///
/// Value must be greater than **0** (default: **192x10x1024x1024**).
#[prost(message, optional, tag = "53")]
pub merge_tree_max_bytes_to_use_cache: ::core::option::Option<i64>,
/// Limits the minimum number of rows to be read from a file to enable concurrent read.
/// If the number of rows to be read exceeds this value, then ClickHouse will try to use a few threads to read from a file concurrently.
///
/// This setting has effect only for tables of the MergeTree family.
///
/// Value must be greater than **0** (default: **20x8192**).
#[prost(message, optional, tag = "54")]
pub merge_tree_min_rows_for_concurrent_read: ::core::option::Option<i64>,
/// Limits the number of bytes to be read from a file to enable concurrent read.
/// If the number of bytes to be read exceeds this value, then ClickHouse will try to use a few threads to read from a file concurrently.
///
/// This setting has effect only for tables of the MergeTree family.
///
/// Value must be greater than **0** (default: **24x10x1024x1024**).
#[prost(message, optional, tag = "55")]
pub merge_tree_min_bytes_for_concurrent_read: ::core::option::Option<i64>,
/// Sets the threshold of RAM consumption (in bytes) after that the temporary data, collected during the **GROUP BY** operation, should be flushed to disk to limit the RAM comsumption.
///
/// By default, aggregation is done by employing hash table that resides in RAM.
/// A query can result in aggregation of huge data volumes that can lead to memory exhaustion and abortion of the query (see the \[max_memory_usage\] setting).
/// For such queries, you can use this setting to force ClickHouse to do flushing and complete aggregation successfully.
///
/// Minimal value and default value: **0**, **GROUP BY** in the external memory is disabled.
///
/// When using aggregation in external memory, it is recommended to set the value of this setting twice as low as the \[max_memory_usage\] setting value (by default, the maximum memory usage is limited to ten gigabytes).
///
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/sql-reference/statements/select/group-by/#select-group-by-in-external-memory>).
///
/// See also: the \[distributed_aggregation_memory_efficient\] setting.
#[prost(message, optional, tag = "74")]
pub max_bytes_before_external_group_by: ::core::option::Option<i64>,
/// This setting is equivalent of the \[max_bytes_before_external_group_by\] setting, except for it is for sort operation (**ORDER BY**), not aggregation.
#[prost(message, optional, tag = "75")]
pub max_bytes_before_external_sort: ::core::option::Option<i64>,
/// Sets the threshold of the number of keys, after that the two-level aggregation should be used.
///
/// Minimal value: **0**, threshold is not set (default: **10000**).
#[prost(message, optional, tag = "76")]
pub group_by_two_level_threshold: ::core::option::Option<i64>,
/// Sets the threshold of the number of bytes, after that the two-level aggregation should be used.
///
/// Minimal value: **0**, threshold is not set (default: **100000000**).
#[prost(message, optional, tag = "77")]
pub group_by_two_level_threshold_bytes: ::core::option::Option<i64>,
/// Sets the priority of a query.
///
/// * **0**-priority is not used.
/// * **1**-the highest priority.
/// * and so on. The higher the number, the lower a query's priority.
///
/// This setting should be set up for each query individually.
///
/// If ClickHouse is working with the high-priority queries, and a low-priority query enters, then the low-priority query is paused until higher-priority queries are completed.
///
/// Minimal value and default value: **0**, priority is not used.
#[prost(message, optional, tag = "56")]
pub priority: ::core::option::Option<i64>,
/// Limits the maximum number of threads to process the request (setting does not take threads that read data from remote servers into account).
///
/// This setting applies to threads that perform the same stages of the query processing pipeline in parallel.
///
/// Minimal value and default value: **0** (the thread number is calculated automatically based on the number of physical CPU cores, no HyperThreading cores are taken into account).
///
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#settings-max_threads>).
#[prost(message, optional, tag = "8")]
pub max_threads: ::core::option::Option<i64>,
/// Limits the maximum memory usage (in bytes) for processing of a single user's query on a single server.
/// This setting does not take server's free RAM amount or total RAM amount into account.
///
/// This limitation is enforced for any user's single query on a single server.
///
/// Minimal value: **0**, no limitation is set.
/// Value that is set in the ClickHouse default config file: **10737418240** (10 GB).
///
/// If you use \[max_bytes_before_external_group_by\] or \[max_bytes_before_external_sort\] setting, then it is recommended to set their values twice as low as \[max_memory_usage\] setting value.
///
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/query-complexity/#settings_max_memory_usage>).
#[prost(message, optional, tag = "11")]
pub max_memory_usage: ::core::option::Option<i64>,
/// Limits the maximum memory usage (in bytes) for processing of user's queries on a single server.
/// This setting does not take server's free RAM amount or total RAM amount into account.
///
/// This limitation is enforced for all queries that belong to one user and run simultaneously on a single server.
///
/// Minimal value and default value: **0**, no limitation is set.
#[prost(message, optional, tag = "12")]
pub max_memory_usage_for_user: ::core::option::Option<i64>,
/// The maximum speed of data exchange over the network in bytes per second for a query.
///
/// Minimal value and default value: **0**, no limitation is set.
#[prost(message, optional, tag = "57")]
pub max_network_bandwidth: ::core::option::Option<i64>,
/// The maximum speed of data exchange over the network in bytes per second for all concurrently running user queries.
///
/// Minimal value and default value: **0**, no limitation is set.
#[prost(message, optional, tag = "58")]
pub max_network_bandwidth_for_user: ::core::option::Option<i64>,
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/ru/operations/settings/query-complexity/#max-partitions-per-insert-block>).
#[prost(message, optional, tag = "102")]
pub max_partitions_per_insert_block: ::core::option::Option<i64>,
/// The maximum number of concurrent requests per user.
/// Default value: 0 (no limit).
#[prost(message, optional, tag = "103")]
pub max_concurrent_queries_for_user: ::core::option::Option<i64>,
/// If enabled, query is not executed if the ClickHouse can't use index by date.
/// This setting has effect only for tables of the MergeTree family.
///
/// Default value: **false** (setting is disabled, query executes even if ClickHouse can't use index by date).
///
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#settings-force_index_by_date>).
#[prost(message, optional, tag = "59")]
pub force_index_by_date: ::core::option::Option<bool>,
/// If enabled, query is not executed if the ClickHouse can't use index by primary key.
/// This setting has effect only for tables of the MergeTree family.
///
/// Default value: **false** (setting is disabled, query executes even if ClickHouse can't use index by primary key).
///
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#force-primary-key>).
#[prost(message, optional, tag = "60")]
pub force_primary_key: ::core::option::Option<bool>,
/// Limits the maximum number of rows that can be read from a table when running a query.
///
/// Minimal value and default value: **0**, no limitation is set.
///
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/query-complexity/#max-rows-to-read>).
#[prost(message, optional, tag = "13")]
pub max_rows_to_read: ::core::option::Option<i64>,
/// Limits the maximum number of bytes (uncompressed data) that can be read from a table when running a query.
///
/// Minimal value and default value: **0**, no limitation is set.
#[prost(message, optional, tag = "14")]
pub max_bytes_to_read: ::core::option::Option<i64>,
/// Determines the behavior on exceeding \[limits\](<https://clickhouse.com/docs/en/operations/settings/query-complexity/#restrictions-on-query-complexity>) while reading the data.
///
/// * **throw**-abort query execution, return an error.
/// * **break**-stop query execution, return partial result.
#[prost(enumeration = "user_settings::OverflowMode", tag = "15")]
pub read_overflow_mode: i32,
/// Limits the maximum number of unique keys received from aggregation function.
/// This setting helps to reduce RAM consumption while doing aggregation.
///
/// Minimal value and default value: **0**, no limitation is set.
#[prost(message, optional, tag = "16")]
pub max_rows_to_group_by: ::core::option::Option<i64>,
/// Determines the behavior on exceeding \[limits\](<https://clickhouse.com/docs/en/operations/settings/query-complexity/#restrictions-on-query-complexity>) while doing aggregation.
///
/// * **throw**-abort query execution, return an error.
/// * **break**-stop query execution, return partial result.
/// * **any**-perform approximate **GROUP BY** operation by continuing aggregation for the keys that got into the set, but don't add new keys to the set.
#[prost(enumeration = "user_settings::GroupByOverflowMode", tag = "17")]
pub group_by_overflow_mode: i32,
/// Limits the maximum number of rows that can be read from a table for sorting.
/// This setting helps to reduce RAM consumption.
///
/// Minimal value and default value: **0**, no limitation is set.
#[prost(message, optional, tag = "18")]
pub max_rows_to_sort: ::core::option::Option<i64>,
/// Limits the maximum number of bytes (uncompressed data) that can be read from a table for sorting.
/// This setting helps to reduce RAM consumption.
///
/// Minimal value and default value: **0**, no limitation is set.
#[prost(message, optional, tag = "19")]
pub max_bytes_to_sort: ::core::option::Option<i64>,
/// Determines the behavior on exceeding \[limits\](<https://clickhouse.com/docs/en/operations/settings/query-complexity/#restrictions-on-query-complexity>) while sorting.
///
/// * **throw**-abort query execution, return an error.
/// * **break**-stop query execution, return partial result.
#[prost(enumeration = "user_settings::OverflowMode", tag = "20")]
pub sort_overflow_mode: i32,
/// Limits the number of rows in the result.
/// This limitation is also checked for subqueries and parts of distributed queries that run on remote servers.
///
/// Minimal value and default value: **0**, no limitation is set.
#[prost(message, optional, tag = "21")]
pub max_result_rows: ::core::option::Option<i64>,
/// Limits the number of bytes in the result.
/// This limitation is also checked for subqueries and parts of distributed queries that run on remote servers.
///
/// Minimal value and default value: **0**, no limitation is set.
#[prost(message, optional, tag = "22")]
pub max_result_bytes: ::core::option::Option<i64>,
/// Determines the behavior on exceeding \[limits\](<https://clickhouse.com/docs/en/operations/settings/query-complexity/#restrictions-on-query-complexity>) while forming result.
///
/// * **throw**-abort query execution, return an error.
/// * **break**-stop query execution, return partial result.
#[prost(enumeration = "user_settings::OverflowMode", tag = "23")]
pub result_overflow_mode: i32,
/// Limits the maximum number of different rows when using **DISTINCT**.
///
/// Minimal value and default value: **0**, no limitation is set.
#[prost(message, optional, tag = "24")]
pub max_rows_in_distinct: ::core::option::Option<i64>,
/// Limits the maximum size of a hash table in bytes (uncompressed data) when using **DISTINCT**.
#[prost(message, optional, tag = "25")]
pub max_bytes_in_distinct: ::core::option::Option<i64>,
/// Determines the behavior on exceeding \[limits\](<https://clickhouse.com/docs/en/operations/settings/query-complexity/#restrictions-on-query-complexity>) while doing **DISCTINCT**.
///
/// * **throw**-abort query execution, return an error.
/// * **break**-stop query execution, return partial result.
#[prost(enumeration = "user_settings::OverflowMode", tag = "26")]
pub distinct_overflow_mode: i32,
/// Limits the maximum number of rows that can be passed to a remote server or saved in a temporary table when using **GLOBAL IN**.
///
/// Minimal value and default value: **0**, no limitation is set.
#[prost(message, optional, tag = "27")]
pub max_rows_to_transfer: ::core::option::Option<i64>,
/// Limits the maximum number of bytes (uncompressed data) that can be passed to a remote server or saved in a temporary
/// table when using **GLOBAL IN**.
///
/// Minimal value and default value: **0**, no limitation is set.
#[prost(message, optional, tag = "28")]
pub max_bytes_to_transfer: ::core::option::Option<i64>,
/// Determines the behavior on exceeding \[limits\](<https://clickhouse.com/docs/en/operations/settings/query-complexity/#restrictions-on-query-complexity>) while doing transfers.
///
/// * **throw**-abort query execution, return an error.
/// * **break**-stop query execution, return partial result.
#[prost(enumeration = "user_settings::OverflowMode", tag = "29")]
pub transfer_overflow_mode: i32,
/// Limits the maximum query execution time in milliseconds.
/// At this moment, this limitation is not checked when passing one of the sorting stages, as well as merging and finalizing aggregation funictions.
///
/// Minimal value and default value: **0**, no limitation is set.
#[prost(message, optional, tag = "30")]
pub max_execution_time: ::core::option::Option<i64>,
/// Determines the behavior on exceeding \[limits\](<https://clickhouse.com/docs/en/operations/settings/query-complexity/#restrictions-on-query-complexity>) of execution time.
///
/// * **throw**-abort query execution, return an error.
/// * **break**-stop query execution, return partial result.
#[prost(enumeration = "user_settings::OverflowMode", tag = "31")]
pub timeout_overflow_mode: i32,
/// Limit on the number of rows in the set resulting from the execution of the IN section.
#[prost(message, optional, tag = "87")]
pub max_rows_in_set: ::core::option::Option<i64>,
/// Limit on the number of bytes in the set resulting from the execution of the IN section.
#[prost(message, optional, tag = "88")]
pub max_bytes_in_set: ::core::option::Option<i64>,
/// Determine the behavior on exceeding max_rows_in_set or max_bytes_in_set limit.
/// Possible values: OVERFLOW_MODE_THROW, OVERFLOW_MODE_BREAK.
#[prost(enumeration = "user_settings::OverflowMode", tag = "89")]
pub set_overflow_mode: i32,
/// Limit on maximum size of the hash table for JOIN, in rows.
#[prost(message, optional, tag = "90")]
pub max_rows_in_join: ::core::option::Option<i64>,
/// Limit on maximum size of the hash table for JOIN, in bytes.
#[prost(message, optional, tag = "91")]
pub max_bytes_in_join: ::core::option::Option<i64>,
/// Determine the behavior on exceeding max_rows_in_join or max_bytes_in_join limit.
/// Possible values: OVERFLOW_MODE_THROW, OVERFLOW_MODE_BREAK.
#[prost(enumeration = "user_settings::OverflowMode", tag = "92")]
pub join_overflow_mode: i32,
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#settings-join_algorithm>).
#[prost(enumeration = "user_settings::JoinAlgorithm", repeated, tag = "104")]
pub join_algorithm: ::prost::alloc::vec::Vec<i32>,
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#any_join_distinct_right_table_keys>).
#[prost(message, optional, tag = "105")]
pub any_join_distinct_right_table_keys: ::core::option::Option<bool>,
/// Limits the maximum number of columns that can be read from a table in a single query.
/// If the query requires to read more columns to complete, then it will be aborted.
///
/// Minimal value and default value: **0**, no limitation is set.
#[prost(message, optional, tag = "32")]
pub max_columns_to_read: ::core::option::Option<i64>,
/// Limits the maximum number of temporary columns that must be kept in RAM at the same time when running a query, including constant columns.
///
/// Minimal value and default value: **0**, no limitation is set.
#[prost(message, optional, tag = "33")]
pub max_temporary_columns: ::core::option::Option<i64>,
/// Limits the maximum number of temporary columns that must be kept in RAM at the same time when running a query, excluding constant columns.
///
/// Minimal value and default value: **0**, no limitation is set.
#[prost(message, optional, tag = "34")]
pub max_temporary_non_const_columns: ::core::option::Option<i64>,
/// Limits the size of the part of a query that can be transferred to RAM for parsing with the SQL parser, in bytes.
///
/// Value must be greater than **0** (default: **262144**).
///
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#settings-max_query_size>).
#[prost(message, optional, tag = "35")]
pub max_query_size: ::core::option::Option<i64>,
/// Limits the maximum depth of query syntax tree.
///
/// Executing a big and complex query may result in building a syntax tree of enormous depth.
/// By using this setting, you can prohibit execution of over-sized or non-optimized queries for huge tables.
///
/// For example, the **SELECT *** query may result in more complex and deeper syntax tree, compared to the **SELECT ... WHERE ...** query, containing constraints and conditions, in the most cases.
/// A user can be forced to construct more optimized queries, if this setting is used.
///
/// Value must be greater than **0** (default: **1000**).
/// If a too small value is set, it may render ClickHouse unable to execute even simple queries.
///
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/query-complexity/#max-ast-depth>).
#[prost(message, optional, tag = "36")]
pub max_ast_depth: ::core::option::Option<i64>,
/// Limits the maximum size of query syntax tree in number of nodes.
///
/// Executing a big and complex query may result in building a syntax tree of enormous size.
/// By using this setting, you can prohibit execution of over-sized or non-optimized queries for huge tables.
///
/// Value must be greater than **0** (default: **50000**).
/// If a too small value is set, it may render ClickHouse unable to execute even simple queries.
///
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/query-complexity/#max-ast-elements>).
#[prost(message, optional, tag = "37")]
pub max_ast_elements: ::core::option::Option<i64>,
/// Limits the maximum size of query syntax tree in number of nodes after expansion of aliases and the asterisk values.
///
/// Executing a big and complex query may result in building a syntax tree of enormous size.
/// By using this setting, you can prohibit execution of over-sized or non-optimized queries for huge tables.
///
/// Value must be greater than **0** (default: **500000**).
/// If a too small value is set, it may render ClickHouse unable to execute even simple queries.
#[prost(message, optional, tag = "38")]
pub max_expanded_ast_elements: ::core::option::Option<i64>,
/// Minimal execution speed in rows per second.
#[prost(message, optional, tag = "84")]
pub min_execution_speed: ::core::option::Option<i64>,
/// Minimal execution speed in bytes per second.
#[prost(message, optional, tag = "85")]
pub min_execution_speed_bytes: ::core::option::Option<i64>,
/// Aggregate function to use for implementation of count(DISTINCT ...).
#[prost(enumeration = "user_settings::CountDistinctImplementation", tag = "86")]
pub count_distinct_implementation: i32,
/// Enables or disables SQL parser if the fast stream parser cannot parse the data.
///
/// Enable this setting, if the data that you want to insert into a table contains SQL expressions.
///
/// For example, the stream parser is unable to parse a value that contains **now()** expression; therefore an **INSERT** query for this value will fail and no data will be inserted into a table.
/// With enabled SQL parser, this expression is parsed correctly: the **now()** expression will be parsed as SQL function, interpreted, and the current date and time will be inserted into the table as a result.
///
/// This setting has effect only if you use \[Values\](<https://clickhouse.com/docs/en/interfaces/formats/#data-format-values>) format when inserting data.
///
/// Default value: **true** (SQL parser is enabled).
///
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#settings-input_format_values_interpret_expressions>).
#[prost(message, optional, tag = "61")]
pub input_format_values_interpret_expressions: ::core::option::Option<bool>,
/// Enables or disables replacing omitted input values with default values of the respective columns when performing **INSERT** queries.
///
/// Default value: **true** (replacing is enabled).
#[prost(message, optional, tag = "62")]
pub input_format_defaults_for_omitted_fields: ::core::option::Option<bool>,
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#input_format_null_as_default>).
#[prost(message, optional, tag = "106")]
pub input_format_null_as_default: ::core::option::Option<bool>,
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#date_time_input_format>).
#[prost(enumeration = "user_settings::DateTimeInputFormat", tag = "107")]
pub date_time_input_format: i32,
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#input_format_with_names_use_header>).
#[prost(message, optional, tag = "108")]
pub input_format_with_names_use_header: ::core::option::Option<bool>,
/// Enables quoting of 64-bit integers in JSON output format.
///
/// If this setting is enabled, then 64-bit integers (**UInt64** and **Int64**) will be quoted when written to JSON output in order to maintain compatibility with the most of the JavaScript engines.
/// Otherwise, such integers will not be quoted.
///
/// Default value: **false** (quoting 64-bit integers is disabled).
#[prost(message, optional, tag = "63")]
pub output_format_json_quote_64bit_integers: ::core::option::Option<bool>,
/// Enables special floating-point values (**+nan**, **-nan**, **+inf** and **-inf**) in JSON output format.
///
/// Default value: **false** (special values do not present in output).
#[prost(message, optional, tag = "64")]
pub output_format_json_quote_denormals: ::core::option::Option<bool>,
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#date_time_output_format>).
#[prost(enumeration = "user_settings::DateTimeOutputFormat", tag = "109")]
pub date_time_output_format: i32,
/// Determines whether to use LowCardinality type in Native format.
///
/// * **true** (default)-yes, use.
/// * **false**-convert LowCardinality columns to regular columns when doing **SELECT**, and convert regular columns to LowCardinality when doing **INSERT**.
///
/// LowCardinality columns (aka sparse columns) store data in more effective way, compared to regular columns, by using hash tables.
/// If data to insert suits this storage format, ClickHouse will place them into LowCardinality column.
///
/// If you use a third-party ClickHouse client that can't work with LowCardinality columns, then this client will not be able to correctly interpret the result of the query that asks for data stored in LowCardinality column.
/// Disable this setting to convert LowCardinality column to regular column when creating the result, so such clients will be able to process the result.
///
/// Official ClickHouse client works with LowCardinality columns out-of-the-box.
///
/// Default value: **true** (LowCardinality columns are used in Native format).
#[prost(message, optional, tag = "78")]
pub low_cardinality_allow_in_native_format: ::core::option::Option<bool>,
/// Allows specifying **LowCardinality** modifier for types of small fixed size (8 or less) in CREATE TABLE statements. Enabling this may increase merge times and memory consumption.
///
/// More info see in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#allow_suspicious_low_cardinality_types>).
#[prost(message, optional, tag = "110")]
pub allow_suspicious_low_cardinality_types: ::core::option::Option<bool>,
/// Enables returning of empty result when aggregating without keys (with **GROUP BY** operation absent) on empty set (e.g., **SELECT count(*) FROM table WHERE 0**).
///
/// * **true**-ClickHouse will return an empty result for such queries.
/// * **false** (default)-ClickHouse will return a single-line result consisting of **NULL** values for aggregation functions, in accordance with SQL standard.
#[prost(message, optional, tag = "79")]
pub empty_result_for_aggregation_by_empty_set: ::core::option::Option<bool>,
/// HTTP connection timeout, in milliseconds.
///
/// Value must be greater than **0** (default: **1000**, 1 second).
#[prost(message, optional, tag = "65")]
pub http_connection_timeout: ::core::option::Option<i64>,
/// HTTP receive timeout, in milliseconds.
///
/// Value must be greater than **0** (default: **1800000**, 1800 seconds, 30 minutes).
#[prost(message, optional, tag = "66")]
pub http_receive_timeout: ::core::option::Option<i64>,
/// HTTP send timeout, in milliseconds.
///
/// Value must be greater than **0** (default: **1800000**, 1800 seconds, 30 minutes).
#[prost(message, optional, tag = "67")]
pub http_send_timeout: ::core::option::Option<i64>,
/// Enables or disables data compression in HTTP responses.
///
/// By default, ClickHouse stores data compressed. When executing a query, its result is uncompressed.
/// Use this setting to command ClickHouse to compress the result when sending it via HTTP.
///
/// Enable this setting and add the **Accept-Encoding: <compression method>** HTTP header in a HTTP request to force compression of HTTP response from ClickHouse.
///
/// ClickHouse support the following compression methods: **gzip**, **br** and **deflate**.
///
/// Default value: **false** (compression is disabled).
///
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/interfaces/http/>).
#[prost(message, optional, tag = "68")]
pub enable_http_compression: ::core::option::Option<bool>,
/// Enables progress notifications using **X-ClickHouse-Progress** HTTP header.
///
/// Default value: **false** (notifications disabled).
#[prost(message, optional, tag = "69")]
pub send_progress_in_http_headers: ::core::option::Option<bool>,
/// Minimum interval between progress notifications with **X-ClickHouse-Progress** HTTP header, in milliseconds.
///
/// Value must be greater than **0** (default: **100**).
#[prost(message, optional, tag = "70")]
pub http_headers_progress_interval: ::core::option::Option<i64>,
/// Adds CORS header in HTTP responses.
///
/// Default value: **false** (header is not added).
#[prost(message, optional, tag = "71")]
pub add_http_cors_header: ::core::option::Option<bool>,
/// Cancels HTTP read-only queries (e.g. SELECT) when a client closes the connection without waiting for the response.
///
/// Default value: **false**.
///
/// More info see in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#cancel-http-readonly-queries-on-client-close>).
#[prost(message, optional, tag = "111")]
pub cancel_http_readonly_queries_on_client_close: ::core::option::Option<bool>,
/// Limits the maximum number of HTTP GET redirect hops for \[URL-engine\](<https://clickhouse.com/docs/en/engines/table-engines/special/url>) tables.
///
/// If the parameter is set to **0** (default), no hops is allowed.
///
/// More info see in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#setting-max_http_get_redirects>).
#[prost(message, optional, tag = "112")]
pub max_http_get_redirects: ::core::option::Option<i64>,
/// Maximum length of field name in HTTP header.
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#http_max_field_name_size>).
#[prost(message, optional, tag = "150")]
pub http_max_field_name_size: ::core::option::Option<i64>,
/// Maximum length of field value in HTTP header.
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#http_max_field_value_size>).
#[prost(message, optional, tag = "151")]
pub http_max_field_value_size: ::core::option::Option<i64>,
#[prost(message, optional, tag = "93")]
pub joined_subquery_requires_alias: ::core::option::Option<bool>,
#[prost(message, optional, tag = "94")]
pub join_use_nulls: ::core::option::Option<bool>,
#[prost(message, optional, tag = "95")]
pub transform_null_in: ::core::option::Option<bool>,
/// Quota accounting mode. Possible values: QUOTA_MODE_DEFAULT, QUOTA_MODE_KEYED and QUOTA_MODE_KEYED_BY_IP.
#[prost(enumeration = "user_settings::QuotaMode", tag = "80")]
pub quota_mode: i32,
/// Sets the data format of a \[nested\](<https://clickhouse.com/docs/en/sql-reference/data-types/nested-data-structures/nested>) columns.
///
/// More info see in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#flatten-nested>).
#[prost(message, optional, tag = "113")]
pub flatten_nested: ::core::option::Option<bool>,
/// Regular expression (for Regexp format)
#[prost(string, tag = "114")]
pub format_regexp: ::prost::alloc::string::String,
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#format_regexp_escaping_rule>).
#[prost(enumeration = "user_settings::FormatRegexpEscapingRule", tag = "115")]
pub format_regexp_escaping_rule: i32,
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#format_regexp_skip_unmatched>).
#[prost(message, optional, tag = "116")]
pub format_regexp_skip_unmatched: ::core::option::Option<bool>,
/// Enables asynchronous inserts.
///
/// Disabled by default.
///
/// More info see in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#async-insert>).
#[prost(message, optional, tag = "117")]
pub async_insert: ::core::option::Option<bool>,
/// The maximum number of threads for background data parsing and insertion.
///
/// If the parameter is set to **0**, asynchronous insertions are disabled. Default value: **16**.
///
/// More info see in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#async-insert-threads>).
#[prost(message, optional, tag = "118")]
pub async_insert_threads: ::core::option::Option<i64>,
/// Enables waiting for processing of asynchronous insertion. If enabled, server returns OK only after the data is inserted.
///
/// More info see in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#wait-for-async-insert>).
#[prost(message, optional, tag = "119")]
pub wait_for_async_insert: ::core::option::Option<bool>,
/// The timeout (in seconds) for waiting for processing of asynchronous insertion.
///
/// Default value: **120**.
///
/// More info see in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#wait-for-async-insert-timeout>).
#[prost(message, optional, tag = "120")]
pub wait_for_async_insert_timeout: ::core::option::Option<i64>,
/// The maximum size of the unparsed data in bytes collected per query before being inserted.
///
/// If the parameter is set to **0**, asynchronous insertions are disabled. Default value: **100000**.
///
/// More info see in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#async-insert-max-data-size>).
#[prost(message, optional, tag = "121")]
pub async_insert_max_data_size: ::core::option::Option<i64>,
/// The maximum timeout in milliseconds since the first INSERT query before inserting collected data.
///
/// If the parameter is set to **0**, the timeout is disabled. Default value: **200**.
///
/// More info see in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings/#async-insert-busy-timeout-ms>).
#[prost(message, optional, tag = "122")]
pub async_insert_busy_timeout: ::core::option::Option<i64>,
/// If it is set to true, use adaptive busy timeout for asynchronous inserts.
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#async_insert_use_adaptive_busy_timeout>).
#[prost(message, optional, tag = "152")]
pub async_insert_use_adaptive_busy_timeout: ::core::option::Option<bool>,
/// Memory profiler step (in bytes).
///
/// If the next query step requires more memory than this parameter specifies, the memory profiler collects the allocating stack trace. Values lower than a few megabytes slow down query processing.
///
/// Default value: **4194304** (4 MB). Zero means disabled memory profiler.
#[prost(message, optional, tag = "124")]
pub memory_profiler_step: ::core::option::Option<i64>,
/// Collect random allocations and deallocations and write them into system.trace_log with 'MemorySample' trace_type. The probability is for every alloc/free regardless to the size of the allocation.
///
/// Possible values: from **0** to **1**. Default: **0**.
#[prost(message, optional, tag = "125")]
pub memory_profiler_sample_probability: ::core::option::Option<f64>,
/// Sets the maximum number of parallel threads for the SELECT query data read phase with the FINAL modifier.
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#max-final-threads>).
#[prost(message, optional, tag = "126")]
pub max_final_threads: ::core::option::Option<i64>,
/// Enables or disables order-preserving parallel parsing of data formats. Supported only for \[TSV\](<https://clickhouse.com/docs/en/interfaces/formats#tabseparated>), \[TKSV\](<https://clickhouse.com/docs/en/interfaces/formats#tskv>), \[CSV\](<https://clickhouse.com/docs/en/interfaces/formats#csv>) and \[JSONEachRow\](<https://clickhouse.com/docs/en/interfaces/formats#jsoneachrow>) formats.
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#input-format-parallel-parsing>)
#[prost(message, optional, tag = "127")]
pub input_format_parallel_parsing: ::core::option::Option<bool>,
/// Enables or disables the insertion of JSON data with nested objects.
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#input-format-parallel-parsing>)
#[prost(message, optional, tag = "128")]
pub input_format_import_nested_json: ::core::option::Option<bool>,
/// Avro schema registry URL.
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/formats#format_avro_schema_registry_url>).
#[prost(string, tag = "148")]
pub format_avro_schema_registry_url: ::prost::alloc::string::String,
/// Allows data types without explicit modifiers NULL or NOT NULL in column definition will be Nullable.
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#data_type_default_nullable>).
#[prost(message, optional, tag = "149")]
pub data_type_default_nullable: ::core::option::Option<bool>,
/// Method of reading data from local filesystem, one of: read, pread, mmap, io_uring, pread_threadpool. The 'io_uring' method is experimental and does not work for Log, TinyLog, StripeLog, File, Set and Join, and other tables with append-able files in presence of concurrent reads and writes.
#[prost(enumeration = "user_settings::LocalFilesystemReadMethod", tag = "129")]
pub local_filesystem_read_method: i32,
/// The maximum size of the buffer to read from the filesystem.
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/codebrowser/ClickHouse/src/Core/Settings.h.html#DB::SettingsTraits::Data::max_read_buffer_size>)
#[prost(message, optional, tag = "130")]
pub max_read_buffer_size: ::core::option::Option<i64>,
/// The setting sets the maximum number of retries for ClickHouse Keeper (or ZooKeeper) requests during insert into replicated MergeTree. Only Keeper requests which failed due to network error, Keeper session timeout, or request timeout are considered for retries.
/// Default: 20 from 23.2, 0(disabled) before
/// Min_version: 22.11
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#insert_keeper_max_retries>)
#[prost(message, optional, tag = "131")]
pub insert_keeper_max_retries: ::core::option::Option<i64>,
/// The maximum amount of data consumed by temporary files on disk in bytes for all concurrently running user queries. Zero means unlimited.
/// Default: 0 - unlimited
/// Min_version: 22.10
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/query-complexity#settings_max_temporary_data_on_disk_size_for_user>)
#[prost(message, optional, tag = "132")]
pub max_temporary_data_on_disk_size_for_user: ::core::option::Option<i64>,
/// The maximum amount of data consumed by temporary files on disk in bytes for all concurrently running queries. Zero means unlimited.
/// Default: 0 - unlimited
/// Min_version: 22.10
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/query-complexity#settings_max_temporary_data_on_disk_size_for_query>)
#[prost(message, optional, tag = "133")]
pub max_temporary_data_on_disk_size_for_query: ::core::option::Option<i64>,
/// Limits maximum recursion depth in the recursive descent parser. Allows controlling the stack size.
/// Default: 1000
/// Special: 0 - unlimited
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#max_parser_depth>)
#[prost(message, optional, tag = "134")]
pub max_parser_depth: ::core::option::Option<i64>,
/// Method of reading data from remote filesystem, one of: read, threadpool.
/// Default: read
/// Min_version: 21.11
/// See in-depth description in [ClickHouse GitHub](<https://github.com/ClickHouse/ClickHouse/blob/f9558345e886876b9132d9c018e357f7fa9b22a3/src/Core/Settings.h#L660>)
#[prost(enumeration = "user_settings::RemoteFilesystemReadMethod", tag = "135")]
pub remote_filesystem_read_method: i32,
/// It represents soft memory limit in case when hard limit is reached on user level. This value is used to compute overcommit ratio for the query. Zero means skip the query.
/// Default: 1GiB
/// Min_version: 22.5
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#memory_overcommit_ratio_denominator>)
#[prost(message, optional, tag = "136")]
pub memory_overcommit_ratio_denominator: ::core::option::Option<i64>,
/// It represents soft memory limit in case when hard limit is reached on global level. This value is used to compute overcommit ratio for the query. Zero means skip the query.
/// Default: 1GiB
/// Min_version: 22.5
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#memory_overcommit_ratio_denominator_for_user>)
#[prost(message, optional, tag = "137")]
pub memory_overcommit_ratio_denominator_for_user: ::core::option::Option<i64>,
/// Maximum time thread will wait for memory to be freed in the case of memory overcommit on a user level. If the timeout is reached and memory is not freed, an exception is thrown.
/// Default: 5000000
/// Min_version: 22.5
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#memory_usage_overcommit_max_wait_microseconds>)
#[prost(message, optional, tag = "138")]
pub memory_usage_overcommit_max_wait_microseconds: ::core::option::Option<i64>,
/// Setting up query threads logging. Query threads log into the \[system.query_thread_log\](<https://clickhouse.com/docs/en/operations/system-tables/query_thread_log>) table. This setting has effect only when \[log_queries\](<https://clickhouse.com/docs/en/operations/settings/settings#log-queries>) is true. Queries threads run by ClickHouse with this setup are logged according to the rules in the \[query_thread_log\](<https://clickhouse.com/docs/en/operations/server-configuration-parameters/settings#server_configuration_parameters-query_thread_log>) server configuration parameter.
/// Default: false
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#log_query_threads>)
#[prost(message, optional, tag = "139")]
pub log_query_threads: ::core::option::Option<bool>,
/// Enables or disables query views logging to the the system.query_view_log table.
/// Default: true
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#log_query_views>)
#[prost(message, optional, tag = "146")]
pub log_query_views: ::core::option::Option<bool>,
/// Log queries with the specified probability.
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#log_queries_probability>).
#[prost(message, optional, tag = "153")]
pub log_queries_probability: ::core::option::Option<f64>,
/// Enabled or disable logging of processors level profiling data to the the system.log_processors_profiles table.
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#log_processors_profiles>).
#[prost(message, optional, tag = "154")]
pub log_processors_profiles: ::core::option::Option<bool>,
/// If turned on, SELECT queries may utilize the query cache.
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#use_query_cache>).
#[prost(message, optional, tag = "155")]
pub use_query_cache: ::core::option::Option<bool>,
/// If turned on, results of SELECT queries are retrieved from the query cache.
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#enable_reads_from_query_cache>).
#[prost(message, optional, tag = "156")]
pub enable_reads_from_query_cache: ::core::option::Option<bool>,
/// If turned on, results of SELECT queries are stored in the query cache.
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#enable_writes_to_query_cache>).
#[prost(message, optional, tag = "157")]
pub enable_writes_to_query_cache: ::core::option::Option<bool>,
/// Minimum number of times a SELECT query must run before its result is stored in the query cache.
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#query_cache_min_query_runs>).
#[prost(message, optional, tag = "158")]
pub query_cache_min_query_runs: ::core::option::Option<i64>,
/// Minimum duration in milliseconds a query needs to run for its result to be stored in the query cache.
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#query_cache_min_query_duration>).
#[prost(message, optional, tag = "159")]
pub query_cache_min_query_duration: ::core::option::Option<i64>,
/// After this time in seconds entries in the query cache become stale.
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#query_cache_ttl>).
#[prost(message, optional, tag = "160")]
pub query_cache_ttl: ::core::option::Option<i64>,
/// The maximum number of query results the current user may store in the query cache. 0 means unlimited.
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#query_cache_max_entries>).
#[prost(message, optional, tag = "161")]
pub query_cache_max_entries: ::core::option::Option<i64>,
/// The maximum amount of memory (in bytes) the current user may allocate in the query cache. 0 means unlimited.
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#query_cache_max_size_in_bytes>).
#[prost(message, optional, tag = "162")]
pub query_cache_max_size_in_bytes: ::core::option::Option<i64>,
/// A string which acts as a label for query cache entries. The same queries with different tags are considered different by the query cache.
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#query_cache_tag>).
#[prost(string, tag = "163")]
pub query_cache_tag: ::prost::alloc::string::String,
/// If turned on, the result of SELECT queries cached in the query cache can be read by other users. It is not recommended to enable this setting due to security reasons.
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#query_cache_share_between_users>).
#[prost(message, optional, tag = "164")]
pub query_cache_share_between_users: ::core::option::Option<bool>,
/// Controls how the query cache handles SELECT queries with non-deterministic functions like rand() or now().
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#query_cache_nondeterministic_function_handling>).
#[prost(
enumeration = "user_settings::QueryCacheNondeterministicFunctionHandling",
tag = "165"
)]
pub query_cache_nondeterministic_function_handling: i32,
/// The maximum number of threads to execute the INSERT SELECT query.
/// Default: 0
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#max_insert_threads>)
#[prost(message, optional, tag = "140")]
pub max_insert_threads: ::core::option::Option<i64>,
/// Enables hedged requests logic for remote queries. It allows to establish many connections with different replicas for query. New connection is enabled in case existent connection(s) with replica(s) were not established within hedged_connection_timeout or no data was received within receive_data_timeout. Query uses the first connection which send non empty progress packet (or data packet, if allow_changing_replica_until_first_data_packet); other connections are cancelled. Queries with max_parallel_replicas > 1 are supported.
/// Default: true
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#use_hedged_requests>)
#[prost(message, optional, tag = "141")]
pub use_hedged_requests: ::core::option::Option<bool>,
/// Timeout to close idle TCP connections after specified number of milliseconds.
/// Default: 360000 (3600 seconds)
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#idle_connection_timeout>)
#[prost(message, optional, tag = "142")]
pub idle_connection_timeout: ::core::option::Option<i64>,
/// Connection timeout for establishing connection with replica for Hedged requests.
/// Default: 50
/// See in-depth description in [ClickHouse GitHub](<https://github.com/ClickHouse/ClickHouse/blob/f9558345e886876b9132d9c018e357f7fa9b22a3/src/Core/Settings.h#L64>)
#[prost(message, optional, tag = "143")]
pub hedged_connection_timeout_ms: ::core::option::Option<i64>,
/// Specifies the algorithm of replicas selection that is used for distributed query processing, one of: random, nearest_hostname, in_order, first_or_random, round_robin.
/// Default: random
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#load_balancing>)
#[prost(enumeration = "user_settings::LoadBalancing", tag = "144")]
pub load_balancing: i32,
/// Enables or disables preferable using the localhost replica when processing distributed queries.
/// Default: true
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#prefer_localhost_replica>)
#[prost(message, optional, tag = "145")]
pub prefer_localhost_replica: ::core::option::Option<bool>,
/// Enables or disable independent processing of partitions for SELECT queries with FINAL.
/// Default: false
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/guides/replacing-merge-tree#exploiting-partitions-with-replacingmergetree>)
#[prost(message, optional, tag = "147")]
pub do_not_merge_across_partitions_select_final: ::core::option::Option<bool>,
/// Ignore materialized views with dropped target table during pushing to views.
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#ignore_materialized_views_with_dropped_target_table>).
#[prost(message, optional, tag = "166")]
pub ignore_materialized_views_with_dropped_target_table: ::core::option::Option<
bool,
>,
/// The setting is deprecated and has no effect.
#[deprecated]
#[prost(message, optional, tag = "44")]
pub compile: ::core::option::Option<bool>,
/// The setting is deprecated and has no effect.
#[deprecated]
#[prost(message, optional, tag = "45")]
pub min_count_to_compile: ::core::option::Option<i64>,
/// The setting is deprecated and has no effect.
#[deprecated]
#[prost(message, optional, tag = "123")]
pub async_insert_stale_timeout: ::core::option::Option<i64>,
}
/// Nested message and enum types in `UserSettings`.
pub mod user_settings {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum OverflowMode {
Unspecified = 0,
Throw = 1,
Break = 2,
}
impl OverflowMode {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
OverflowMode::Unspecified => "OVERFLOW_MODE_UNSPECIFIED",
OverflowMode::Throw => "OVERFLOW_MODE_THROW",
OverflowMode::Break => "OVERFLOW_MODE_BREAK",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"OVERFLOW_MODE_UNSPECIFIED" => Some(Self::Unspecified),
"OVERFLOW_MODE_THROW" => Some(Self::Throw),
"OVERFLOW_MODE_BREAK" => Some(Self::Break),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum GroupByOverflowMode {
Unspecified = 0,
Throw = 1,
Break = 2,
Any = 3,
}
impl GroupByOverflowMode {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
GroupByOverflowMode::Unspecified => "GROUP_BY_OVERFLOW_MODE_UNSPECIFIED",
GroupByOverflowMode::Throw => "GROUP_BY_OVERFLOW_MODE_THROW",
GroupByOverflowMode::Break => "GROUP_BY_OVERFLOW_MODE_BREAK",
GroupByOverflowMode::Any => "GROUP_BY_OVERFLOW_MODE_ANY",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"GROUP_BY_OVERFLOW_MODE_UNSPECIFIED" => Some(Self::Unspecified),
"GROUP_BY_OVERFLOW_MODE_THROW" => Some(Self::Throw),
"GROUP_BY_OVERFLOW_MODE_BREAK" => Some(Self::Break),
"GROUP_BY_OVERFLOW_MODE_ANY" => Some(Self::Any),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum DistributedProductMode {
Unspecified = 0,
/// Default value. Prohibits using these types of subqueries (returns the "Double-distributed in/JOIN subqueries is denied" exception).
Deny = 1,
/// Replaces the database and table in the subquery with local ones for the destination server (shard), leaving the normal IN/JOIN.
Local = 2,
/// Replaces the IN/JOIN query with GLOBAL IN/GLOBAL JOIN.
Global = 3,
/// Allows the use of these types of subqueries.
Allow = 4,
}
impl DistributedProductMode {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
DistributedProductMode::Unspecified => {
"DISTRIBUTED_PRODUCT_MODE_UNSPECIFIED"
}
DistributedProductMode::Deny => "DISTRIBUTED_PRODUCT_MODE_DENY",
DistributedProductMode::Local => "DISTRIBUTED_PRODUCT_MODE_LOCAL",
DistributedProductMode::Global => "DISTRIBUTED_PRODUCT_MODE_GLOBAL",
DistributedProductMode::Allow => "DISTRIBUTED_PRODUCT_MODE_ALLOW",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DISTRIBUTED_PRODUCT_MODE_UNSPECIFIED" => Some(Self::Unspecified),
"DISTRIBUTED_PRODUCT_MODE_DENY" => Some(Self::Deny),
"DISTRIBUTED_PRODUCT_MODE_LOCAL" => Some(Self::Local),
"DISTRIBUTED_PRODUCT_MODE_GLOBAL" => Some(Self::Global),
"DISTRIBUTED_PRODUCT_MODE_ALLOW" => Some(Self::Allow),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum QuotaMode {
Unspecified = 0,
Default = 1,
Keyed = 2,
KeyedByIp = 3,
}
impl QuotaMode {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
QuotaMode::Unspecified => "QUOTA_MODE_UNSPECIFIED",
QuotaMode::Default => "QUOTA_MODE_DEFAULT",
QuotaMode::Keyed => "QUOTA_MODE_KEYED",
QuotaMode::KeyedByIp => "QUOTA_MODE_KEYED_BY_IP",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"QUOTA_MODE_UNSPECIFIED" => Some(Self::Unspecified),
"QUOTA_MODE_DEFAULT" => Some(Self::Default),
"QUOTA_MODE_KEYED" => Some(Self::Keyed),
"QUOTA_MODE_KEYED_BY_IP" => Some(Self::KeyedByIp),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum CountDistinctImplementation {
Unspecified = 0,
Uniq = 1,
UniqCombined = 2,
UniqCombined64 = 3,
UniqHll12 = 4,
UniqExact = 5,
}
impl CountDistinctImplementation {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
CountDistinctImplementation::Unspecified => {
"COUNT_DISTINCT_IMPLEMENTATION_UNSPECIFIED"
}
CountDistinctImplementation::Uniq => "COUNT_DISTINCT_IMPLEMENTATION_UNIQ",
CountDistinctImplementation::UniqCombined => {
"COUNT_DISTINCT_IMPLEMENTATION_UNIQ_COMBINED"
}
CountDistinctImplementation::UniqCombined64 => {
"COUNT_DISTINCT_IMPLEMENTATION_UNIQ_COMBINED_64"
}
CountDistinctImplementation::UniqHll12 => {
"COUNT_DISTINCT_IMPLEMENTATION_UNIQ_HLL_12"
}
CountDistinctImplementation::UniqExact => {
"COUNT_DISTINCT_IMPLEMENTATION_UNIQ_EXACT"
}
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"COUNT_DISTINCT_IMPLEMENTATION_UNSPECIFIED" => Some(Self::Unspecified),
"COUNT_DISTINCT_IMPLEMENTATION_UNIQ" => Some(Self::Uniq),
"COUNT_DISTINCT_IMPLEMENTATION_UNIQ_COMBINED" => Some(Self::UniqCombined),
"COUNT_DISTINCT_IMPLEMENTATION_UNIQ_COMBINED_64" => {
Some(Self::UniqCombined64)
}
"COUNT_DISTINCT_IMPLEMENTATION_UNIQ_HLL_12" => Some(Self::UniqHll12),
"COUNT_DISTINCT_IMPLEMENTATION_UNIQ_EXACT" => Some(Self::UniqExact),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum JoinAlgorithm {
Unspecified = 0,
Hash = 1,
ParallelHash = 2,
PartialMerge = 3,
Direct = 4,
Auto = 5,
FullSortingMerge = 6,
PreferPartialMerge = 7,
}
impl JoinAlgorithm {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
JoinAlgorithm::Unspecified => "JOIN_ALGORITHM_UNSPECIFIED",
JoinAlgorithm::Hash => "JOIN_ALGORITHM_HASH",
JoinAlgorithm::ParallelHash => "JOIN_ALGORITHM_PARALLEL_HASH",
JoinAlgorithm::PartialMerge => "JOIN_ALGORITHM_PARTIAL_MERGE",
JoinAlgorithm::Direct => "JOIN_ALGORITHM_DIRECT",
JoinAlgorithm::Auto => "JOIN_ALGORITHM_AUTO",
JoinAlgorithm::FullSortingMerge => "JOIN_ALGORITHM_FULL_SORTING_MERGE",
JoinAlgorithm::PreferPartialMerge => {
"JOIN_ALGORITHM_PREFER_PARTIAL_MERGE"
}
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"JOIN_ALGORITHM_UNSPECIFIED" => Some(Self::Unspecified),
"JOIN_ALGORITHM_HASH" => Some(Self::Hash),
"JOIN_ALGORITHM_PARALLEL_HASH" => Some(Self::ParallelHash),
"JOIN_ALGORITHM_PARTIAL_MERGE" => Some(Self::PartialMerge),
"JOIN_ALGORITHM_DIRECT" => Some(Self::Direct),
"JOIN_ALGORITHM_AUTO" => Some(Self::Auto),
"JOIN_ALGORITHM_FULL_SORTING_MERGE" => Some(Self::FullSortingMerge),
"JOIN_ALGORITHM_PREFER_PARTIAL_MERGE" => Some(Self::PreferPartialMerge),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum FormatRegexpEscapingRule {
Unspecified = 0,
Escaped = 1,
Quoted = 2,
Csv = 3,
Json = 4,
Xml = 5,
Raw = 6,
}
impl FormatRegexpEscapingRule {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
FormatRegexpEscapingRule::Unspecified => {
"FORMAT_REGEXP_ESCAPING_RULE_UNSPECIFIED"
}
FormatRegexpEscapingRule::Escaped => {
"FORMAT_REGEXP_ESCAPING_RULE_ESCAPED"
}
FormatRegexpEscapingRule::Quoted => "FORMAT_REGEXP_ESCAPING_RULE_QUOTED",
FormatRegexpEscapingRule::Csv => "FORMAT_REGEXP_ESCAPING_RULE_CSV",
FormatRegexpEscapingRule::Json => "FORMAT_REGEXP_ESCAPING_RULE_JSON",
FormatRegexpEscapingRule::Xml => "FORMAT_REGEXP_ESCAPING_RULE_XML",
FormatRegexpEscapingRule::Raw => "FORMAT_REGEXP_ESCAPING_RULE_RAW",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"FORMAT_REGEXP_ESCAPING_RULE_UNSPECIFIED" => Some(Self::Unspecified),
"FORMAT_REGEXP_ESCAPING_RULE_ESCAPED" => Some(Self::Escaped),
"FORMAT_REGEXP_ESCAPING_RULE_QUOTED" => Some(Self::Quoted),
"FORMAT_REGEXP_ESCAPING_RULE_CSV" => Some(Self::Csv),
"FORMAT_REGEXP_ESCAPING_RULE_JSON" => Some(Self::Json),
"FORMAT_REGEXP_ESCAPING_RULE_XML" => Some(Self::Xml),
"FORMAT_REGEXP_ESCAPING_RULE_RAW" => Some(Self::Raw),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum DateTimeInputFormat {
Unspecified = 0,
BestEffort = 1,
Basic = 2,
BestEffortUs = 3,
}
impl DateTimeInputFormat {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
DateTimeInputFormat::Unspecified => "DATE_TIME_INPUT_FORMAT_UNSPECIFIED",
DateTimeInputFormat::BestEffort => "DATE_TIME_INPUT_FORMAT_BEST_EFFORT",
DateTimeInputFormat::Basic => "DATE_TIME_INPUT_FORMAT_BASIC",
DateTimeInputFormat::BestEffortUs => {
"DATE_TIME_INPUT_FORMAT_BEST_EFFORT_US"
}
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DATE_TIME_INPUT_FORMAT_UNSPECIFIED" => Some(Self::Unspecified),
"DATE_TIME_INPUT_FORMAT_BEST_EFFORT" => Some(Self::BestEffort),
"DATE_TIME_INPUT_FORMAT_BASIC" => Some(Self::Basic),
"DATE_TIME_INPUT_FORMAT_BEST_EFFORT_US" => Some(Self::BestEffortUs),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum DateTimeOutputFormat {
Unspecified = 0,
Simple = 1,
Iso = 2,
UnixTimestamp = 3,
}
impl DateTimeOutputFormat {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
DateTimeOutputFormat::Unspecified => {
"DATE_TIME_OUTPUT_FORMAT_UNSPECIFIED"
}
DateTimeOutputFormat::Simple => "DATE_TIME_OUTPUT_FORMAT_SIMPLE",
DateTimeOutputFormat::Iso => "DATE_TIME_OUTPUT_FORMAT_ISO",
DateTimeOutputFormat::UnixTimestamp => {
"DATE_TIME_OUTPUT_FORMAT_UNIX_TIMESTAMP"
}
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DATE_TIME_OUTPUT_FORMAT_UNSPECIFIED" => Some(Self::Unspecified),
"DATE_TIME_OUTPUT_FORMAT_SIMPLE" => Some(Self::Simple),
"DATE_TIME_OUTPUT_FORMAT_ISO" => Some(Self::Iso),
"DATE_TIME_OUTPUT_FORMAT_UNIX_TIMESTAMP" => Some(Self::UnixTimestamp),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum LocalFilesystemReadMethod {
Unspecified = 0,
Read = 1,
PreadThreadpool = 2,
Pread = 3,
Nmap = 4,
}
impl LocalFilesystemReadMethod {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
LocalFilesystemReadMethod::Unspecified => {
"LOCAL_FILESYSTEM_READ_METHOD_UNSPECIFIED"
}
LocalFilesystemReadMethod::Read => "LOCAL_FILESYSTEM_READ_METHOD_READ",
LocalFilesystemReadMethod::PreadThreadpool => {
"LOCAL_FILESYSTEM_READ_METHOD_PREAD_THREADPOOL"
}
LocalFilesystemReadMethod::Pread => "LOCAL_FILESYSTEM_READ_METHOD_PREAD",
LocalFilesystemReadMethod::Nmap => "LOCAL_FILESYSTEM_READ_METHOD_NMAP",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"LOCAL_FILESYSTEM_READ_METHOD_UNSPECIFIED" => Some(Self::Unspecified),
"LOCAL_FILESYSTEM_READ_METHOD_READ" => Some(Self::Read),
"LOCAL_FILESYSTEM_READ_METHOD_PREAD_THREADPOOL" => {
Some(Self::PreadThreadpool)
}
"LOCAL_FILESYSTEM_READ_METHOD_PREAD" => Some(Self::Pread),
"LOCAL_FILESYSTEM_READ_METHOD_NMAP" => Some(Self::Nmap),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum RemoteFilesystemReadMethod {
Unspecified = 0,
Read = 1,
Threadpool = 2,
}
impl RemoteFilesystemReadMethod {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
RemoteFilesystemReadMethod::Unspecified => {
"REMOTE_FILESYSTEM_READ_METHOD_UNSPECIFIED"
}
RemoteFilesystemReadMethod::Read => "REMOTE_FILESYSTEM_READ_METHOD_READ",
RemoteFilesystemReadMethod::Threadpool => {
"REMOTE_FILESYSTEM_READ_METHOD_THREADPOOL"
}
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"REMOTE_FILESYSTEM_READ_METHOD_UNSPECIFIED" => Some(Self::Unspecified),
"REMOTE_FILESYSTEM_READ_METHOD_READ" => Some(Self::Read),
"REMOTE_FILESYSTEM_READ_METHOD_THREADPOOL" => Some(Self::Threadpool),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum LoadBalancing {
Unspecified = 0,
Random = 1,
NearestHostname = 2,
InOrder = 3,
FirstOrRandom = 4,
RoundRobin = 5,
}
impl LoadBalancing {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
LoadBalancing::Unspecified => "LOAD_BALANCING_UNSPECIFIED",
LoadBalancing::Random => "LOAD_BALANCING_RANDOM",
LoadBalancing::NearestHostname => "LOAD_BALANCING_NEAREST_HOSTNAME",
LoadBalancing::InOrder => "LOAD_BALANCING_IN_ORDER",
LoadBalancing::FirstOrRandom => "LOAD_BALANCING_FIRST_OR_RANDOM",
LoadBalancing::RoundRobin => "LOAD_BALANCING_ROUND_ROBIN",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"LOAD_BALANCING_UNSPECIFIED" => Some(Self::Unspecified),
"LOAD_BALANCING_RANDOM" => Some(Self::Random),
"LOAD_BALANCING_NEAREST_HOSTNAME" => Some(Self::NearestHostname),
"LOAD_BALANCING_IN_ORDER" => Some(Self::InOrder),
"LOAD_BALANCING_FIRST_OR_RANDOM" => Some(Self::FirstOrRandom),
"LOAD_BALANCING_ROUND_ROBIN" => Some(Self::RoundRobin),
_ => None,
}
}
}
/// Controls how the query cache handles SELECT queries with non-deterministic functions like rand() or now().
/// See in-depth description in [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/settings/settings#query_cache_nondeterministic_function_handling>).
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum QueryCacheNondeterministicFunctionHandling {
Unspecified = 0,
/// Throw an exception and don't cache the query result.
Throw = 1,
/// Cache the query result.
Save = 2,
/// Don't cache the query result and don't throw an exception.
Ignore = 3,
}
impl QueryCacheNondeterministicFunctionHandling {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
QueryCacheNondeterministicFunctionHandling::Unspecified => {
"QUERY_CACHE_NONDETERMINISTIC_FUNCTION_HANDLING_UNSPECIFIED"
}
QueryCacheNondeterministicFunctionHandling::Throw => {
"QUERY_CACHE_NONDETERMINISTIC_FUNCTION_HANDLING_THROW"
}
QueryCacheNondeterministicFunctionHandling::Save => {
"QUERY_CACHE_NONDETERMINISTIC_FUNCTION_HANDLING_SAVE"
}
QueryCacheNondeterministicFunctionHandling::Ignore => {
"QUERY_CACHE_NONDETERMINISTIC_FUNCTION_HANDLING_IGNORE"
}
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"QUERY_CACHE_NONDETERMINISTIC_FUNCTION_HANDLING_UNSPECIFIED" => {
Some(Self::Unspecified)
}
"QUERY_CACHE_NONDETERMINISTIC_FUNCTION_HANDLING_THROW" => {
Some(Self::Throw)
}
"QUERY_CACHE_NONDETERMINISTIC_FUNCTION_HANDLING_SAVE" => Some(Self::Save),
"QUERY_CACHE_NONDETERMINISTIC_FUNCTION_HANDLING_IGNORE" => {
Some(Self::Ignore)
}
_ => None,
}
}
}
}
/// ClickHouse quota representation. Each quota associated with an user and limits it resource usage for an interval.
/// See in-depth description [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/quotas/>).
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserQuota {
/// Duration of interval for quota in milliseconds.
/// Minimal value is 1 second.
#[prost(message, optional, tag = "1")]
pub interval_duration: ::core::option::Option<i64>,
/// The total number of queries.
/// 0 - unlimited.
#[prost(message, optional, tag = "2")]
pub queries: ::core::option::Option<i64>,
/// The number of queries that threw exception.
/// 0 - unlimited.
#[prost(message, optional, tag = "3")]
pub errors: ::core::option::Option<i64>,
/// The total number of rows given as the result..
/// 0 - unlimited.
#[prost(message, optional, tag = "4")]
pub result_rows: ::core::option::Option<i64>,
/// The total number of source rows read from tables for running the query, on all remote servers.
/// 0 - unlimited.
#[prost(message, optional, tag = "5")]
pub read_rows: ::core::option::Option<i64>,
/// The total query execution time, in milliseconds (wall time).
/// 0 - unlimited.
#[prost(message, optional, tag = "6")]
pub execution_time: ::core::option::Option<i64>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetClusterRequest {
/// ID of the ClickHouse Cluster resource to return.
/// To get the cluster ID, use a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClustersRequest {
/// ID of the folder to list ClickHouse clusters in.
/// To get the folder ID, use a \[yandex.cloud.resourcemanager.v1.FolderService.List\] request.
#[prost(string, tag = "1")]
pub folder_id: ::prost::alloc::string::String,
/// The maximum number of results per page to return. If the number of available
/// results is larger than \[page_size\], the service returns a \[ListClustersResponse.next_page_token\]
/// that can be used to get the next page of results in subsequent list requests.
#[prost(int64, tag = "2")]
pub page_size: i64,
/// Page token. To get the next page of results, set \[page_token\] to the \[ListClustersResponse.next_page_token\]
/// returned by the previous list request.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// A filter expression that filters resources listed in the response.
/// The expression must specify:
/// 1. The field name. Currently you can only use filtering with the \[Cluster.name\] field.
/// 2. An `=` operator.
/// 3. The value in double quotes (`"`). Must be 1-63 characters long and match the regular expression `\[a-zA-Z0-9_-\]+`.
#[prost(string, tag = "4")]
pub filter: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClustersResponse {
/// List of ClickHouse Cluster resources.
#[prost(message, repeated, tag = "1")]
pub clusters: ::prost::alloc::vec::Vec<Cluster>,
/// This token allows you to get the next page of results for list requests. If the number of results
/// is larger than \[ListClustersRequest.page_size\], use the \[next_page_token\] as the value
/// for the \[ListClustersRequest.page_token\] parameter in the next list request. Each subsequent
/// list request will have its own \[next_page_token\] to continue paging through the results.
#[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 CreateClusterRequest {
/// ID of the folder to create the ClickHouse cluster in.
#[prost(string, tag = "1")]
pub folder_id: ::prost::alloc::string::String,
/// Name of the ClickHouse cluster. The name must be unique within the folder.
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
/// Description of the ClickHouse cluster.
#[prost(string, tag = "3")]
pub description: ::prost::alloc::string::String,
/// Custom labels for the ClickHouse cluster as `key:value` pairs. Maximum 64 per resource.
/// For example, "project": "mvp" or "source": "dictionary".
#[prost(map = "string, string", tag = "4")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Deployment environment of the ClickHouse cluster.
#[prost(enumeration = "cluster::Environment", tag = "5")]
pub environment: i32,
/// Configuration and resources for hosts that should be created for the ClickHouse cluster.
#[prost(message, optional, tag = "6")]
pub config_spec: ::core::option::Option<ConfigSpec>,
/// Descriptions of databases to be created in the ClickHouse cluster.
#[prost(message, repeated, tag = "7")]
pub database_specs: ::prost::alloc::vec::Vec<DatabaseSpec>,
/// Descriptions of database users to be created in the ClickHouse cluster.
#[prost(message, repeated, tag = "8")]
pub user_specs: ::prost::alloc::vec::Vec<UserSpec>,
/// Individual configurations for hosts that should be created for the ClickHouse cluster.
#[prost(message, repeated, tag = "9")]
pub host_specs: ::prost::alloc::vec::Vec<HostSpec>,
/// ID of the network to create the cluster in.
#[prost(string, tag = "10")]
pub network_id: ::prost::alloc::string::String,
/// Name of the first shard in cluster. If not set, defaults to the value 'shard1'.
#[prost(string, tag = "11")]
pub shard_name: ::prost::alloc::string::String,
/// ID of the service account used for access to Object Storage.
#[prost(string, tag = "12")]
pub service_account_id: ::prost::alloc::string::String,
/// User security groups
#[prost(string, repeated, tag = "13")]
pub security_group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Deletion Protection inhibits deletion of the cluster
#[prost(bool, tag = "14")]
pub deletion_protection: bool,
/// Window of maintenance operations.
#[prost(message, optional, tag = "15")]
pub maintenance_window: ::core::option::Option<MaintenanceWindow>,
/// Configuration(s) of the shard(s) to be created.
#[prost(message, repeated, tag = "16")]
pub shard_specs: ::prost::alloc::vec::Vec<ShardSpec>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateClusterMetadata {
/// ID of the ClickHouse cluster that is being created.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateClusterRequest {
/// ID of the ClickHouse Cluster resource to update.
/// To get the ClickHouse cluster ID, use a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Field mask that specifies which fields of the ClickHouse Cluster resource should be updated.
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
/// New description of the ClickHouse cluster.
#[prost(string, tag = "3")]
pub description: ::prost::alloc::string::String,
/// Custom labels for the ClickHouse cluster as `key:value` pairs. Maximum 64 per resource.
/// For example, "project": "mvp" or "source": "dictionary".
///
/// The new set of labels will completely replace the old ones. To add a label, request the current
/// set with the \[ClusterService.Get\] method, then send an \[ClusterService.Update\] request with the new label added to the set.
#[prost(map = "string, string", tag = "4")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// New configuration and resources for hosts in the cluster.
#[prost(message, optional, tag = "5")]
pub config_spec: ::core::option::Option<ConfigSpec>,
/// New name for the cluster.
#[prost(string, tag = "6")]
pub name: ::prost::alloc::string::String,
/// ID of the service account used for access to Object Storage.
#[prost(string, tag = "7")]
pub service_account_id: ::prost::alloc::string::String,
/// New maintenance window settings for the cluster.
#[prost(message, optional, tag = "8")]
pub maintenance_window: ::core::option::Option<MaintenanceWindow>,
/// User security groups
#[prost(string, repeated, tag = "9")]
pub security_group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Deletion Protection inhibits deletion of the cluster
#[prost(bool, tag = "10")]
pub deletion_protection: bool,
/// ID of the network to move the cluster to.
#[prost(string, tag = "11")]
pub network_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateClusterMetadata {
/// ID of the ClickHouse Cluster resource that is being updated.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterRequest {
/// ID of the ClickHouse cluster to delete.
/// To get the ClickHouse cluster ID, use a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterMetadata {
/// ID of the ClickHouse cluster that is being deleted.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartClusterRequest {
/// ID of the ClickHouse cluster to start.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartClusterMetadata {
/// ID of the ClickHouse cluster being started.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StopClusterRequest {
/// ID of the ClickHouse cluster to stop.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StopClusterMetadata {
/// ID of the ClickHouse cluster being stopped.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MoveClusterRequest {
/// ID of the ClickHouse cluster to move.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// ID of the destination folder.
#[prost(string, tag = "2")]
pub destination_folder_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MoveClusterMetadata {
/// ID of the ClickHouse cluster being moved.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// ID of the source folder.
#[prost(string, tag = "2")]
pub source_folder_id: ::prost::alloc::string::String,
/// ID of the destination folder.
#[prost(string, tag = "3")]
pub destination_folder_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddClusterZookeeperRequest {
/// ID of the ClickHouse cluster to modify.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Resources allocated to Zookeeper hosts.
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<Resources>,
/// Configuration of ZooKeeper hosts.
#[prost(message, repeated, tag = "3")]
pub host_specs: ::prost::alloc::vec::Vec<HostSpec>,
/// Enable automatic convertation of non-replicated MergeTree tables to replicated ones.
#[prost(message, optional, tag = "4")]
pub convert_tables_to_replicated: ::core::option::Option<bool>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddClusterZookeeperMetadata {
/// ID of the ClickHouse cluster.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BackupClusterRequest {
/// ID of the ClickHouse cluster to back up.
/// To get the ClickHouse cluster ID use a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BackupClusterMetadata {
/// ID of the ClickHouse cluster that is being backed up.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestoreClusterRequest {
/// ID of the backup to restore from. This backup will be used to create one cluster shard.
/// To get the backup ID, use a \[ClusterService.ListBackups\] request.
#[prost(string, tag = "1")]
pub backup_id: ::prost::alloc::string::String,
/// Additional IDs of the backups to restore from.
/// Each additional backup is responsible for restoring separate shard.
/// Restored cluster will have len(additional_backup_ids)+1 shards in total.
/// To get the backup ID, use a \[ClusterService.ListBackups\] request.
#[prost(string, repeated, tag = "13")]
pub additional_backup_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Name of the new ClickHouse cluster. The name must be unique within the folder.
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
/// Description of the new ClickHouse cluster.
#[prost(string, tag = "3")]
pub description: ::prost::alloc::string::String,
/// Custom labels for the ClickHouse cluster as `key:value` pairs. Maximum 64 per resource.
/// For example, "project": "mvp" or "source": "dictionary".
#[prost(map = "string, string", tag = "4")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Deployment environment of the new ClickHouse cluster.
#[prost(enumeration = "cluster::Environment", tag = "5")]
pub environment: i32,
/// Configuration for the ClickHouse cluster to be created.
#[prost(message, optional, tag = "6")]
pub config_spec: ::core::option::Option<ConfigSpec>,
/// Configurations for ClickHouse hosts that should be created for
/// the cluster that is being created from the backup.
#[prost(message, repeated, tag = "7")]
pub host_specs: ::prost::alloc::vec::Vec<HostSpec>,
/// ID of the network to create the ClickHouse cluster in.
#[prost(string, tag = "8")]
pub network_id: ::prost::alloc::string::String,
/// ID of the folder to create the ClickHouse cluster in.
#[prost(string, tag = "9")]
pub folder_id: ::prost::alloc::string::String,
/// ID of the service account used for access to Object Storage.
#[prost(string, tag = "10")]
pub service_account_id: ::prost::alloc::string::String,
/// User security groups
#[prost(string, repeated, tag = "11")]
pub security_group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Deletion Protection inhibits deletion of the cluster
#[prost(bool, tag = "14")]
pub deletion_protection: bool,
/// Configuration(s) of the shard(s) in the restored cluster.
#[prost(message, repeated, tag = "15")]
pub shard_specs: ::prost::alloc::vec::Vec<ShardSpec>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestoreClusterMetadata {
/// ID of the new ClickHouse cluster that is being created from a backup.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// ID of the backup that is being used for creating a cluster.
#[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 RescheduleMaintenanceRequest {
/// ID of the ClickHouse cluster to reschedule the maintenance operation for.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// The type of reschedule request.
#[prost(enumeration = "reschedule_maintenance_request::RescheduleType", tag = "2")]
pub reschedule_type: i32,
/// The time until which this maintenance operation should be delayed. The value should be ahead of the first time when the maintenance operation has been scheduled for no more than two weeks. The value can also point to the past moment of time if \[reschedule_type.IMMEDIATE\] reschedule type is chosen.
#[prost(message, optional, tag = "3")]
pub delayed_until: ::core::option::Option<::prost_types::Timestamp>,
}
/// Nested message and enum types in `RescheduleMaintenanceRequest`.
pub mod reschedule_maintenance_request {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum RescheduleType {
Unspecified = 0,
/// Start the maintenance operation immediately.
Immediate = 1,
/// Start the maintenance operation within the next available maintenance window.
NextAvailableWindow = 2,
/// Start the maintenance operation at the specific time.
SpecificTime = 3,
}
impl RescheduleType {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
RescheduleType::Unspecified => "RESCHEDULE_TYPE_UNSPECIFIED",
RescheduleType::Immediate => "IMMEDIATE",
RescheduleType::NextAvailableWindow => "NEXT_AVAILABLE_WINDOW",
RescheduleType::SpecificTime => "SPECIFIC_TIME",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"RESCHEDULE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"IMMEDIATE" => Some(Self::Immediate),
"NEXT_AVAILABLE_WINDOW" => Some(Self::NextAvailableWindow),
"SPECIFIC_TIME" => Some(Self::SpecificTime),
_ => None,
}
}
}
}
/// Rescheduled maintenance operation metadata.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RescheduleMaintenanceMetadata {
/// Required. ID of the ClickHouse cluster.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Required. The time until which this maintenance operation is to be delayed.
#[prost(message, optional, tag = "4")]
pub delayed_until: ::core::option::Option<::prost_types::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LogRecord {
/// Log record timestamp in \[RFC3339\](<https://www.ietf.org/rfc/rfc3339.txt>) text format.
#[prost(message, optional, tag = "1")]
pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
/// Contents of the log record.
#[prost(map = "string, string", tag = "2")]
pub message: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClusterLogsRequest {
/// ID of the ClickHouse cluster to request logs for.
/// To get the ClickHouse cluster ID, use a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Columns from logs table to request.
/// If no columns are specified, entire log records are returned.
#[prost(string, repeated, tag = "2")]
pub column_filter: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Type of the service to request logs about.
#[prost(enumeration = "list_cluster_logs_request::ServiceType", tag = "3")]
pub service_type: i32,
/// Start timestamp for the logs request, in \[RFC3339\](<https://www.ietf.org/rfc/rfc3339.txt>) text format.
#[prost(message, optional, tag = "4")]
pub from_time: ::core::option::Option<::prost_types::Timestamp>,
/// End timestamp for the logs request, in \[RFC3339\](<https://www.ietf.org/rfc/rfc3339.txt>) text format.
#[prost(message, optional, tag = "5")]
pub to_time: ::core::option::Option<::prost_types::Timestamp>,
/// The maximum number of results per page to return. If the number of available
/// results is larger than \[page_size\], the service returns a \[ListClusterLogsResponse.next_page_token\]
/// that can be used to get the next page of results in subsequent list requests.
#[prost(int64, tag = "6")]
pub page_size: i64,
/// Page token. To get the next page of results, set \[page_token\] to the \[ListClusterLogsResponse.next_page_token\]
/// returned by the previous list request.
#[prost(string, tag = "7")]
pub page_token: ::prost::alloc::string::String,
}
/// Nested message and enum types in `ListClusterLogsRequest`.
pub mod list_cluster_logs_request {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ServiceType {
Unspecified = 0,
/// Logs of ClickHouse activity.
Clickhouse = 1,
}
impl ServiceType {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
ServiceType::Unspecified => "SERVICE_TYPE_UNSPECIFIED",
ServiceType::Clickhouse => "CLICKHOUSE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SERVICE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"CLICKHOUSE" => Some(Self::Clickhouse),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClusterLogsResponse {
/// Requested log records.
#[prost(message, repeated, tag = "1")]
pub logs: ::prost::alloc::vec::Vec<LogRecord>,
/// This token allows you to get the next page of results for list requests. If the number of results
/// is larger than \[ListClusterLogsRequest.page_size\], use the \[next_page_token\] as the value
/// for the \[ListClusterLogsRequest.page_token\] query parameter in the next list request.
/// Each subsequent list request will have its own \[next_page_token\] to continue paging through the results.
/// This value is interchangeable with the \[StreamLogRecord.next_record_token\] from StreamLogs method.
#[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 StreamLogRecord {
/// One of the requested log records.
#[prost(message, optional, tag = "1")]
pub record: ::core::option::Option<LogRecord>,
/// This token allows you to continue streaming logs starting from the exact
/// same record. To continue streaming, specify value of [next_record_token[
/// as value for the \[StreamClusterLogsRequest.record_token\] parameter in the next StreamLogs request.
/// This value is interchangeable with the \[ListClusterLogsResponse.next_page_token\] from ListLogs method.
#[prost(string, tag = "2")]
pub next_record_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamClusterLogsRequest {
/// Required. ID of the ClickHouse cluster.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Columns from logs table to get in the response.
#[prost(string, repeated, tag = "2")]
pub column_filter: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(enumeration = "stream_cluster_logs_request::ServiceType", tag = "3")]
pub service_type: i32,
/// Start timestamp for the logs request.
#[prost(message, optional, tag = "4")]
pub from_time: ::core::option::Option<::prost_types::Timestamp>,
/// End timestamp for the logs request.
/// If this field is not set, all existing logs will be sent and then the new ones as
/// they appear. In essence it has `tail -f` semantics.
#[prost(message, optional, tag = "5")]
pub to_time: ::core::option::Option<::prost_types::Timestamp>,
/// Record token. Set \[record_token\] to the \[StreamLogRecord.next_record_token\] returned by a previous StreamLogs
/// request to start streaming from next log record.
#[prost(string, tag = "6")]
pub record_token: ::prost::alloc::string::String,
/// A filter expression that filters resources listed in the response.
/// The expression must specify:
/// 1. The field name. Currently filtering can be applied to the \[LogRecord.logs.message.hostname\], \[LogRecord.logs.message.severity\] fields.
/// 2. An `=` operator.
/// 3. The value in double quotes (`"`). Must be 1-63 characters long and match the regular expression `\[a-z0-9.-\]{1,61}`.
/// Examples of a filter:
/// - `message.hostname='node1.db.cloud.yandex.net'`
/// - `message.severity IN ('Error', 'Fatal') AND message.hostname != 'node2.db.cloud.yandex.net'`.
#[prost(string, tag = "7")]
pub filter: ::prost::alloc::string::String,
}
/// Nested message and enum types in `StreamClusterLogsRequest`.
pub mod stream_cluster_logs_request {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ServiceType {
Unspecified = 0,
/// Logs of ClickHouse activity.
Clickhouse = 1,
}
impl ServiceType {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
ServiceType::Unspecified => "SERVICE_TYPE_UNSPECIFIED",
ServiceType::Clickhouse => "CLICKHOUSE",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SERVICE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"CLICKHOUSE" => Some(Self::Clickhouse),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClusterOperationsRequest {
/// ID of the ClickHouse Cluster resource to list operations for.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// The maximum number of results per page to return. If the number of available
/// results is larger than \[page_size\], the service returns a \[ListClusterOperationsResponse.next_page_token\]
/// that can be used to get the next page of results in subsequent list requests.
#[prost(int64, tag = "2")]
pub page_size: i64,
/// Page token. To get the next page of results, set \[page_token\] to the \[ListClusterOperationsResponse.next_page_token\]
/// returned by the previous list request.
#[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 ListClusterOperationsResponse {
/// List of Operation resources for the specified ClickHouse cluster.
#[prost(message, repeated, tag = "1")]
pub operations: ::prost::alloc::vec::Vec<super::super::super::operation::Operation>,
/// This token allows you to get the next page of results for list requests. If the number of results
/// is larger than \[ListClusterOperationsRequest.page_size\], use the \[next_page_token\] as the value
/// for the \[ListClusterOperationsRequest.page_token\] query parameter in the next list request.
/// Each subsequent list request will have its own \[next_page_token\] to continue paging through the results.
#[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 ListClusterBackupsRequest {
/// ID of the ClickHouse cluster.
/// To get the ClickHouse cluster ID, use a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// The maximum number of results per page to return. If the number of available
/// results is larger than \[page_size\], the service returns a \[ListClusterBackupsResponse.next_page_token\]
/// that can be used to get the next page of results in subsequent list requests.
#[prost(int64, tag = "2")]
pub page_size: i64,
/// Page token. To get the next page of results, set \[page_token\] to the
/// \[ListClusterBackupsResponse.next_page_token\] returned by the previous list request.
#[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 ListClusterBackupsResponse {
/// List of ClickHouse Backup resources.
#[prost(message, repeated, tag = "1")]
pub backups: ::prost::alloc::vec::Vec<Backup>,
/// This token allows you to get the next page of results for list requests. If the number of results
/// is larger than \[ListClusterBackupsRequest.page_size\], use the \[next_page_token\] as the value
/// for the \[ListClusterBackupsRequest.page_token\] query parameter in the next list request.
/// Each subsequent list request will have its own \[next_page_token\] to continue paging through the results.
#[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 ListClusterHostsRequest {
/// ID of the ClickHouse cluster.
/// To get the ClickHouse cluster ID use a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// The maximum number of results per page to return. If the number of available
/// results is larger than \[page_size\], the service returns a \[ListClusterHostsResponse.next_page_token\]
/// that can be used to get the next page of results in subsequent list requests.
#[prost(int64, tag = "2")]
pub page_size: i64,
/// Page token. To get the next page of results, set \[page_token\] to the \[ListClusterHostsResponse.next_page_token\]
/// returned by the previous list request.
#[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 ListClusterHostsResponse {
/// Requested list of hosts for the cluster.
#[prost(message, repeated, tag = "1")]
pub hosts: ::prost::alloc::vec::Vec<Host>,
/// This token allows you to get the next page of results for list requests. If the number of results
/// is larger than \[ListClusterHostsRequest.page_size\], use the \[next_page_token\] as the value
/// for the \[ListClusterHostsRequest.page_token\] query parameter in the next list request.
/// Each subsequent list request will have its own \[next_page_token\] to continue paging through the results.
#[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 AddClusterHostsRequest {
/// ID of the ClickHouse cluster to add hosts to.
/// To get the ClickHouse cluster ID, use a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Configurations for ClickHouse hosts that should be added to the cluster.
#[prost(message, repeated, tag = "2")]
pub host_specs: ::prost::alloc::vec::Vec<HostSpec>,
/// Whether to copy schema to new ClickHouse hosts from replicas.
#[prost(message, optional, tag = "3")]
pub copy_schema: ::core::option::Option<bool>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddClusterHostsMetadata {
/// ID of the ClickHouse cluster to which the hosts are being added.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Names of hosts that are being added to the cluster.
#[prost(string, repeated, tag = "2")]
pub host_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateHostSpec {
/// Name of the host to update.
/// To get the ClickHouse host name, use a \[ClusterService.ListHosts\] request.
#[prost(string, tag = "1")]
pub host_name: ::prost::alloc::string::String,
/// Field mask that specifies which fields of the ClickHouse host should be updated.
#[prost(message, optional, tag = "2")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
/// Whether the host should get a public IP address on creation.
#[prost(message, optional, tag = "3")]
pub assign_public_ip: ::core::option::Option<bool>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateClusterHostsRequest {
/// ID of the ClickHouse cluster to update hosts in.
/// To get the ClickHouse cluster ID, use a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// New configurations to apply to hosts.
#[prost(message, repeated, tag = "2")]
pub update_host_specs: ::prost::alloc::vec::Vec<UpdateHostSpec>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateClusterHostsMetadata {
/// ID of the ClickHouse cluster to modify hosts in.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Names of hosts that are being modified.
#[prost(string, repeated, tag = "2")]
pub host_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterHostsRequest {
/// ID of the ClickHouse cluster to remove hosts from.
/// To get the ClickHouse cluster ID, use a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Names of hosts to delete.
#[prost(string, repeated, tag = "2")]
pub host_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterHostsMetadata {
/// ID of the ClickHouse cluster to remove hosts from.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Names of hosts that are being deleted.
#[prost(string, repeated, tag = "2")]
pub host_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestartClusterHostsRequest {
/// Required. ID of the Clickhouse cluster.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Required. Name of the hosts to restart.
#[prost(string, repeated, tag = "2")]
pub host_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestartClusterHostsMetadata {
/// Required. ID of the ClickHouse cluster.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Required. The name of restarting host.
#[prost(string, repeated, tag = "2")]
pub host_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetClusterShardRequest {
/// ID of the cluster that the shard belongs to.
/// To get the cluster ID, use a \[ClusterService.List\] request.
/// To get the name of the database, use a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the shard to request information about.
/// To get the name of a shard, use a \[ClusterService.ListShards\] request.
#[prost(string, tag = "2")]
pub shard_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClusterShardsRequest {
/// ID of the ClickHouse cluster to list shards in.
/// To get the cluster ID, use a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// The maximum number of results per page to return. If the number of available
/// results is larger than \[page_size\], the service returns a \[ListClusterShardsResponse.next_page_token\]
/// that can be used to get the next page of results in subsequent list requests.
#[prost(int64, tag = "2")]
pub page_size: i64,
/// Page token. to get the next page of results, set \[page_token\] to the \[ListClusterShardsResponse.next_page_token\]
/// returned by the previous list request.
#[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 ListClusterShardsResponse {
/// List of ClickHouse shards.
#[prost(message, repeated, tag = "1")]
pub shards: ::prost::alloc::vec::Vec<Shard>,
/// This token allows you to get the next page of results for list requests. If the number of results
/// is larger than \[ListClusterShardsRequest.page_size\], use the \[next_page_token\] as the value
/// for the \[ListClusterShardsRequest.page_token\] parameter in the next list request. Each subsequent
/// list request will have its own \[next_page_token\] to continue paging through the results.
#[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 AddClusterShardRequest {
/// ID of the ClickHouse cluster to add a shard to.
/// To get the ClickHouse cluster ID, use a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name for the new shard.
#[prost(string, tag = "2")]
pub shard_name: ::prost::alloc::string::String,
/// Configuration of the new shard.
#[prost(message, optional, tag = "3")]
pub config_spec: ::core::option::Option<ShardConfigSpec>,
/// Configurations for ClickHouse hosts that should be created with the shard.
#[prost(message, repeated, tag = "4")]
pub host_specs: ::prost::alloc::vec::Vec<HostSpec>,
/// Whether to copy schema to hosts of the shard to be created. The schema is copied from hosts of an existing shard.
#[prost(message, optional, tag = "5")]
pub copy_schema: ::core::option::Option<bool>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddClusterShardMetadata {
/// ID of the cluster that a shard is being added to.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the shard being created.
#[prost(string, tag = "2")]
pub shard_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddClusterShardsRequest {
/// ID of the ClickHouse cluster to add shards to.
/// To get the ClickHouse cluster ID, use a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Properties of each shard to be created.
/// If \[ShardSpec.config_spec\] is not specified for some shard, for this shard
/// it defaults to the configuration of the first shard in the cluster.
#[prost(message, repeated, tag = "2")]
pub shard_specs: ::prost::alloc::vec::Vec<ShardSpec>,
/// Individual configurations for hosts that should be created for the shards.
/// Two options are available:
/// 1. If `host_specs` is empty, each shard's number and configurations of hosts will
/// be copied from those of the first shard in the cluster;
/// 2. Otherwise `host_specs` should contain at least one host per created shard.
#[prost(message, repeated, tag = "3")]
pub host_specs: ::prost::alloc::vec::Vec<HostSpec>,
/// Whether to copy schema to hosts of the new shards. The schema is copied from hosts of an existing shard.
#[prost(message, optional, tag = "4")]
pub copy_schema: ::core::option::Option<bool>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddClusterShardsMetadata {
/// ID of the cluster that the shards are being added to.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Names of the shards being created.
#[prost(string, repeated, tag = "2")]
pub shard_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateClusterShardRequest {
/// ID of the ClickHouse cluster the shard belongs to.
/// To get the cluster ID, use a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the shard to be updated.
/// To get the name of a shard, use a \[ClusterService.ListShards\] request.
#[prost(string, tag = "2")]
pub shard_name: ::prost::alloc::string::String,
/// Field mask that specifies which attributes of the ClickHouse shard should be updated.
#[prost(message, optional, tag = "3")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
/// New configuration for the specified shard.
#[prost(message, optional, tag = "4")]
pub config_spec: ::core::option::Option<ShardConfigSpec>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateClusterShardMetadata {
/// ID of the cluster that contains the shard being updated.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the shard being updated.
#[prost(string, tag = "2")]
pub shard_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterShardRequest {
/// ID of the ClickHouse cluster the shard belongs to.
/// To get the cluster ID, use a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the shard to be deleted.
/// To get the name of a shard, use a \[ClusterService.ListShards\] request.
#[prost(string, tag = "2")]
pub shard_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterShardMetadata {
/// ID of the cluster that contains the shard being deleted.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the shard being deleted.
#[prost(string, tag = "2")]
pub shard_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterShardsRequest {
/// ID of the ClickHouse cluster the shards belong to.
/// To get the cluster ID, use a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Names of the shards to be deleted.
/// To get the name of a shard, use a \[ClusterService.ListShards\] request.
#[prost(string, repeated, tag = "2")]
pub shard_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterShardsMetadata {
/// ID of the cluster that contains the shards being deleted.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Names of the shards being deleted.
#[prost(string, repeated, tag = "2")]
pub shard_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetClusterShardGroupRequest {
/// ID of the cluster that the shard group belongs to.
///
/// To get the cluster ID, make a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the shard group to request information about.
///
/// To get the name of a shard group, make a \[ClusterService.ListShardGroups\] request.
#[prost(string, tag = "2")]
pub shard_group_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClusterShardGroupsRequest {
/// ID of the cluster that the shard group belongs to.
///
/// To get the cluster ID, make a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// The maximum number of results per page to return.
///
/// If the number of available results is larger than \[page_size\], the service returns a \[ListClusterShardGroupsResponse.next_page_token\] that can be used to get the next page of results in subsequent list requests.
#[prost(int64, tag = "2")]
pub page_size: i64,
/// Page token.
///
/// To get the next page of results, set \[page_token\] to the \[ListClusterShardGroupsResponse.next_page_token\] returned by the previous list request.
#[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 ListClusterShardGroupsResponse {
/// List of ClickHouse cluster's shard groups.
#[prost(message, repeated, tag = "1")]
pub shard_groups: ::prost::alloc::vec::Vec<ShardGroup>,
/// This token allows you to get the next page of results for list requests.
///
/// If the number of results is larger than \[ListClusterShardGroupsRequest.page_size\], use the \[next_page_token\] as the value for the \[ListClusterShardGroupsRequest.page_token\] parameter in the next list request.
/// Each subsequent list request will have its own \[next_page_token\] to continue paging through the results.
#[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 CreateClusterShardGroupRequest {
/// ID of the ClickHouse cluster to add a shard group to.
///
/// To get the cluster ID, make a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name for the new shard group.
#[prost(string, tag = "2")]
pub shard_group_name: ::prost::alloc::string::String,
/// Description of the new shard group. 0-256 characters long.
#[prost(string, tag = "3")]
pub description: ::prost::alloc::string::String,
/// List of shard names that should be put into the new group.
///
/// To get the list, make a \[ClusterService.ListShardGroups\] request.
#[prost(string, repeated, tag = "4")]
pub shard_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateClusterShardGroupMetadata {
/// ID of the cluster to add a shard group to.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the shard group that is being added.
#[prost(string, tag = "2")]
pub shard_group_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateClusterShardGroupRequest {
/// ID of the ClickHouse cluster that contains the shard group to update.
///
/// To get the cluster ID, make a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the shard group that should be updated.
///
/// To get the name, make a \[ClusterService.ListShardGroups\] request.
#[prost(string, tag = "2")]
pub shard_group_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
/// Updated description of the shard group. 0-256 characters long.
#[prost(string, tag = "4")]
pub description: ::prost::alloc::string::String,
/// Updated list of shard names that belongs to the shard group.
#[prost(string, repeated, tag = "5")]
pub shard_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateClusterShardGroupMetadata {
/// ID of the cluster that contains the shard group being updated.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the shard group that is being updated.
#[prost(string, tag = "2")]
pub shard_group_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterShardGroupRequest {
/// ID of the ClickHouse cluster that contains the shard group to delete.
///
/// To get the cluster ID, make a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the shard group that should be deleted.
///
/// To get the name, make a \[ClusterService.ListShardGroups\] request.
#[prost(string, tag = "2")]
pub shard_group_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterShardGroupMetadata {
/// ID of the cluster that contains the shard group being deleted.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the shard group that is being deleted.
#[prost(string, tag = "2")]
pub shard_group_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClusterExternalDictionariesRequest {
/// ID of the cluster that the external dictionaries belong to.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// The maximum number of results per page to return. If the number of available
/// results is larger than \[page_size\], the service returns a \[ListClusterExternalDictionaryResponse.next_page_token\]
/// that can be used to get the next page of results in subsequent list requests.
#[prost(int64, tag = "2")]
pub page_size: i64,
/// Page token. To get the next page of results, set \[page_token\] to the \[ListClusterExternalDictionaryResponse.next_page_token\]
/// returned by a previous list request.
#[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 ListClusterExternalDictionariesResponse {
/// List of ClickHouse Cluster external dictionaries.
#[prost(message, repeated, tag = "1")]
pub external_dictionaries: ::prost::alloc::vec::Vec<
config::clickhouse_config::ExternalDictionary,
>,
/// This token allows you to get the next page of results for list requests. If the number of results
/// is larger than \[ListClusterExternalDictionaryRequest.page_size\], use the \[next_page_token\] as the value
/// for the \[ListClusterExternalDictionaryRequest.page_token\] parameter in the next list request. Each subsequent
/// list request will have its own \[next_page_token\] to continue paging through the results.
#[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 CreateClusterExternalDictionaryRequest {
/// ID of the ClickHouse cluster to create the external dictionary for.
/// To get the cluster ID, use a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Configuration of the external dictionary.
#[prost(message, optional, tag = "2")]
pub external_dictionary: ::core::option::Option<
config::clickhouse_config::ExternalDictionary,
>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateClusterExternalDictionaryMetadata {
/// ID of the cluster for which an external dictionary is being created.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateClusterExternalDictionaryRequest {
/// ID of the ClickHouse cluster to update the external dictionary for.
/// To get the cluster ID, use a \[List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Configuration of the external dictionary.
#[prost(message, optional, tag = "2")]
pub external_dictionary: ::core::option::Option<
config::clickhouse_config::ExternalDictionary,
>,
/// Field mask that specifies which fields of the External Dictionary should be updated.
#[prost(message, optional, tag = "3")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateClusterExternalDictionaryMetadata {
/// ID of the cluster for which an external dictionary is being updated.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the external dictionary.
#[prost(string, tag = "2")]
pub external_dictionary_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterExternalDictionaryRequest {
/// ID of the ClickHouse cluster to delete the external dictionary from.
/// To get the cluster ID, use a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the external dictionary to delete.
#[prost(string, tag = "2")]
pub external_dictionary_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteClusterExternalDictionaryMetadata {
/// ID of the cluster where an external dictionary is being deleted.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HostSpec {
/// ID of the availability zone where the host resides.
/// To get a list of available zones, use the \[yandex.cloud.compute.v1.ZoneService.List\] request.
#[prost(string, tag = "1")]
pub zone_id: ::prost::alloc::string::String,
/// Type of the host to be deployed.
#[prost(enumeration = "host::Type", tag = "2")]
pub r#type: i32,
/// ID of the subnet that the host should belong to. This subnet should be a part
/// of the network that the cluster belongs to.
/// The ID of the network is set in the \[Cluster.network_id\] field.
#[prost(string, tag = "3")]
pub subnet_id: ::prost::alloc::string::String,
/// Whether the host should get a public IP address on creation.
///
/// After a host has been created, this setting cannot be changed. To remove an assigned public IP, or to assign
/// a public IP to a host without one, recreate the host with \[assign_public_ip\] set as needed.
///
/// Possible values:
/// * false - don't assign a public IP to the host.
/// * true - the host should have a public IP address.
#[prost(bool, tag = "4")]
pub assign_public_ip: bool,
/// Name of the shard that the host is assigned to.
#[prost(string, tag = "5")]
pub shard_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConfigSpec {
/// Version of the ClickHouse server software.
#[prost(string, tag = "3")]
pub version: ::prost::alloc::string::String,
/// Configuration and resources for a ClickHouse server.
#[prost(message, optional, tag = "1")]
pub clickhouse: ::core::option::Option<config_spec::Clickhouse>,
/// Configuration and resources for a ZooKeeper server.
#[prost(message, optional, tag = "2")]
pub zookeeper: ::core::option::Option<config_spec::Zookeeper>,
/// Time to start the daily backup, in the UTC timezone.
#[prost(message, optional, tag = "4")]
pub backup_window_start: ::core::option::Option<
super::super::super::super::super::google::r#type::TimeOfDay,
>,
/// Access policy for external services.
///
/// If you want a specific service to access the ClickHouse cluster, then set the necessary values in this policy.
#[prost(message, optional, tag = "5")]
pub access: ::core::option::Option<Access>,
#[prost(message, optional, tag = "6")]
pub cloud_storage: ::core::option::Option<CloudStorage>,
/// Whether database management through SQL commands is enabled.
#[prost(message, optional, tag = "7")]
pub sql_database_management: ::core::option::Option<bool>,
/// Whether user management through SQL commands is enabled.
#[prost(message, optional, tag = "8")]
pub sql_user_management: ::core::option::Option<bool>,
/// Password for user 'admin' that has SQL user management access.
#[prost(string, tag = "9")]
pub admin_password: ::prost::alloc::string::String,
/// Whether cluster should use embedded Keeper instead of Zookeeper
#[prost(message, optional, tag = "10")]
pub embedded_keeper: ::core::option::Option<bool>,
/// Retain period of automatically created backup in days
#[prost(message, optional, tag = "11")]
pub backup_retain_period_days: ::core::option::Option<i64>,
}
/// Nested message and enum types in `ConfigSpec`.
pub mod config_spec {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Clickhouse {
/// Configuration for a ClickHouse server.
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::ClickhouseConfig>,
/// Resources allocated to ClickHouse hosts.
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Zookeeper {
/// Resources allocated to ZooKeeper hosts. If not set, minimal available resources will be used.
/// All available resource presets can be retrieved with a \[ResourcePresetService.List\] request.
#[prost(message, optional, tag = "1")]
pub resources: ::core::option::Option<super::Resources>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ShardConfigSpec {
/// ClickHouse configuration for a shard.
#[prost(message, optional, tag = "1")]
pub clickhouse: ::core::option::Option<shard_config_spec::Clickhouse>,
}
/// Nested message and enum types in `ShardConfigSpec`.
pub mod shard_config_spec {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Clickhouse {
/// ClickHouse settings for the shard.
#[prost(message, optional, tag = "1")]
pub config: ::core::option::Option<super::config::ClickhouseConfig>,
/// Computational resources for the shard.
#[prost(message, optional, tag = "2")]
pub resources: ::core::option::Option<super::Resources>,
/// Relative weight of the shard considered when writing data to the cluster.
/// For details, see [ClickHouse documentation](<https://clickhouse.com/docs/en/operations/table_engines/distributed/>).
#[prost(message, optional, tag = "3")]
pub weight: ::core::option::Option<i64>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ShardSpec {
/// Name of the shard to be created.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// Configuration of the shard to be created.
#[prost(message, optional, tag = "2")]
pub config_spec: ::core::option::Option<ShardConfigSpec>,
/// Shard groups that contain the shard.
#[prost(string, repeated, tag = "3")]
pub shard_group_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Generated client implementations.
pub mod cluster_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// A set of methods for managing ClickHouse clusters.
#[derive(Debug, Clone)]
pub struct ClusterServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl ClusterServiceClient<tonic::transport::Channel> {
/// Attempt to create a new client by connecting to a given endpoint.
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> ClusterServiceClient<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,
) -> ClusterServiceClient<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,
{
ClusterServiceClient::new(InterceptedService::new(inner, interceptor))
}
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Limits the maximum size of a decoded message.
///
/// Default: `4MB`
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
/// Limits the maximum size of an encoded message.
///
/// Default: `usize::MAX`
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// Returns the specified ClickHouse cluster.
///
/// To get the list of available ClickHouse clusters, make a [List] request.
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::GetClusterRequest>,
) -> std::result::Result<tonic::Response<super::Cluster>, 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.mdb.clickhouse.v1.ClusterService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"Get",
),
);
self.inner.unary(req, path, codec).await
}
/// Retrieves a list of ClickHouse clusters that belong
/// to the specified folder.
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::ListClustersRequest>,
) -> std::result::Result<
tonic::Response<super::ListClustersResponse>,
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.mdb.clickhouse.v1.ClusterService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"List",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a ClickHouse cluster in the specified folder.
pub async fn create(
&mut self,
request: impl tonic::IntoRequest<super::CreateClusterRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.ClusterService/Create",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"Create",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates the specified ClickHouse cluster.
pub async fn update(
&mut self,
request: impl tonic::IntoRequest<super::UpdateClusterRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.ClusterService/Update",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"Update",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes the specified ClickHouse cluster.
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeleteClusterRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.ClusterService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"Delete",
),
);
self.inner.unary(req, path, codec).await
}
/// Starts the specified ClickHouse cluster.
pub async fn start(
&mut self,
request: impl tonic::IntoRequest<super::StartClusterRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.ClusterService/Start",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"Start",
),
);
self.inner.unary(req, path, codec).await
}
/// Stops the specified ClickHouse cluster.
pub async fn stop(
&mut self,
request: impl tonic::IntoRequest<super::StopClusterRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.ClusterService/Stop",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"Stop",
),
);
self.inner.unary(req, path, codec).await
}
/// Moves a ClickHouse cluster to the specified folder.
pub async fn r#move(
&mut self,
request: impl tonic::IntoRequest<super::MoveClusterRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.ClusterService/Move",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"Move",
),
);
self.inner.unary(req, path, codec).await
}
/// Adds a ZooKeeper subcluster to the specified ClickHouse cluster.
pub async fn add_zookeeper(
&mut self,
request: impl tonic::IntoRequest<super::AddClusterZookeeperRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.ClusterService/AddZookeeper",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"AddZookeeper",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a backup for the specified ClickHouse cluster.
pub async fn backup(
&mut self,
request: impl tonic::IntoRequest<super::BackupClusterRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.ClusterService/Backup",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"Backup",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new ClickHouse cluster using the specified backup.
pub async fn restore(
&mut self,
request: impl tonic::IntoRequest<super::RestoreClusterRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.ClusterService/Restore",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"Restore",
),
);
self.inner.unary(req, path, codec).await
}
/// Reschedules planned maintenance operation.
pub async fn reschedule_maintenance(
&mut self,
request: impl tonic::IntoRequest<super::RescheduleMaintenanceRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.ClusterService/RescheduleMaintenance",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"RescheduleMaintenance",
),
);
self.inner.unary(req, path, codec).await
}
/// Retrieves logs for the specified ClickHouse cluster.
pub async fn list_logs(
&mut self,
request: impl tonic::IntoRequest<super::ListClusterLogsRequest>,
) -> std::result::Result<
tonic::Response<super::ListClusterLogsResponse>,
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.mdb.clickhouse.v1.ClusterService/ListLogs",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"ListLogs",
),
);
self.inner.unary(req, path, codec).await
}
/// Same as ListLogs but using server-side streaming. Also allows for `tail -f` semantics.
pub async fn stream_logs(
&mut self,
request: impl tonic::IntoRequest<super::StreamClusterLogsRequest>,
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::StreamLogRecord>>,
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.mdb.clickhouse.v1.ClusterService/StreamLogs",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"StreamLogs",
),
);
self.inner.server_streaming(req, path, codec).await
}
/// Retrieves the list of Operation resources for the specified cluster.
pub async fn list_operations(
&mut self,
request: impl tonic::IntoRequest<super::ListClusterOperationsRequest>,
) -> std::result::Result<
tonic::Response<super::ListClusterOperationsResponse>,
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.mdb.clickhouse.v1.ClusterService/ListOperations",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"ListOperations",
),
);
self.inner.unary(req, path, codec).await
}
/// Retrieves the list of available backups for the specified ClickHouse cluster.
pub async fn list_backups(
&mut self,
request: impl tonic::IntoRequest<super::ListClusterBackupsRequest>,
) -> std::result::Result<
tonic::Response<super::ListClusterBackupsResponse>,
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.mdb.clickhouse.v1.ClusterService/ListBackups",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"ListBackups",
),
);
self.inner.unary(req, path, codec).await
}
/// Retrieves a list of hosts for the specified cluster.
pub async fn list_hosts(
&mut self,
request: impl tonic::IntoRequest<super::ListClusterHostsRequest>,
) -> std::result::Result<
tonic::Response<super::ListClusterHostsResponse>,
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.mdb.clickhouse.v1.ClusterService/ListHosts",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"ListHosts",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates new hosts for a cluster.
pub async fn add_hosts(
&mut self,
request: impl tonic::IntoRequest<super::AddClusterHostsRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.ClusterService/AddHosts",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"AddHosts",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates the specified hosts.
pub async fn update_hosts(
&mut self,
request: impl tonic::IntoRequest<super::UpdateClusterHostsRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.ClusterService/UpdateHosts",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"UpdateHosts",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes the specified hosts for a cluster.
pub async fn delete_hosts(
&mut self,
request: impl tonic::IntoRequest<super::DeleteClusterHostsRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.ClusterService/DeleteHosts",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"DeleteHosts",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn restart_hosts(
&mut self,
request: impl tonic::IntoRequest<super::RestartClusterHostsRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.ClusterService/RestartHosts",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"RestartHosts",
),
);
self.inner.unary(req, path, codec).await
}
/// Returns the specified shard.
pub async fn get_shard(
&mut self,
request: impl tonic::IntoRequest<super::GetClusterShardRequest>,
) -> std::result::Result<tonic::Response<super::Shard>, 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.mdb.clickhouse.v1.ClusterService/GetShard",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"GetShard",
),
);
self.inner.unary(req, path, codec).await
}
/// Retrieves a list of shards that belong to the specified cluster.
pub async fn list_shards(
&mut self,
request: impl tonic::IntoRequest<super::ListClusterShardsRequest>,
) -> std::result::Result<
tonic::Response<super::ListClusterShardsResponse>,
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.mdb.clickhouse.v1.ClusterService/ListShards",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"ListShards",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new shard in the specified cluster.
pub async fn add_shard(
&mut self,
request: impl tonic::IntoRequest<super::AddClusterShardRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.ClusterService/AddShard",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"AddShard",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates one or more shards in the specified cluster.
pub async fn add_shards(
&mut self,
request: impl tonic::IntoRequest<super::AddClusterShardsRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.ClusterService/AddShards",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"AddShards",
),
);
self.inner.unary(req, path, codec).await
}
/// Modifies the specified shard.
pub async fn update_shard(
&mut self,
request: impl tonic::IntoRequest<super::UpdateClusterShardRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.ClusterService/UpdateShard",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"UpdateShard",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes the specified shard.
pub async fn delete_shard(
&mut self,
request: impl tonic::IntoRequest<super::DeleteClusterShardRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.ClusterService/DeleteShard",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"DeleteShard",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes the specified shards (one or more).
pub async fn delete_shards(
&mut self,
request: impl tonic::IntoRequest<super::DeleteClusterShardsRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.ClusterService/DeleteShards",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"DeleteShards",
),
);
self.inner.unary(req, path, codec).await
}
/// Returns the specified shard group.
pub async fn get_shard_group(
&mut self,
request: impl tonic::IntoRequest<super::GetClusterShardGroupRequest>,
) -> std::result::Result<tonic::Response<super::ShardGroup>, 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.mdb.clickhouse.v1.ClusterService/GetShardGroup",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"GetShardGroup",
),
);
self.inner.unary(req, path, codec).await
}
/// Retrieves a list of shard groups that belong to specified cluster.
pub async fn list_shard_groups(
&mut self,
request: impl tonic::IntoRequest<super::ListClusterShardGroupsRequest>,
) -> std::result::Result<
tonic::Response<super::ListClusterShardGroupsResponse>,
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.mdb.clickhouse.v1.ClusterService/ListShardGroups",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"ListShardGroups",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new shard group in the specified cluster.
pub async fn create_shard_group(
&mut self,
request: impl tonic::IntoRequest<super::CreateClusterShardGroupRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.ClusterService/CreateShardGroup",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"CreateShardGroup",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates the specified shard group.
pub async fn update_shard_group(
&mut self,
request: impl tonic::IntoRequest<super::UpdateClusterShardGroupRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.ClusterService/UpdateShardGroup",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"UpdateShardGroup",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes the specified shard group.
pub async fn delete_shard_group(
&mut self,
request: impl tonic::IntoRequest<super::DeleteClusterShardGroupRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.ClusterService/DeleteShardGroup",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"DeleteShardGroup",
),
);
self.inner.unary(req, path, codec).await
}
/// Retrieves a list of external dictionaries that belong to specified cluster.
pub async fn list_external_dictionaries(
&mut self,
request: impl tonic::IntoRequest<
super::ListClusterExternalDictionariesRequest,
>,
) -> std::result::Result<
tonic::Response<super::ListClusterExternalDictionariesResponse>,
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.mdb.clickhouse.v1.ClusterService/ListExternalDictionaries",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"ListExternalDictionaries",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates an external dictionary for the specified ClickHouse cluster.
pub async fn create_external_dictionary(
&mut self,
request: impl tonic::IntoRequest<
super::CreateClusterExternalDictionaryRequest,
>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.ClusterService/CreateExternalDictionary",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"CreateExternalDictionary",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates an external dictionary for the specified ClickHouse cluster.
pub async fn update_external_dictionary(
&mut self,
request: impl tonic::IntoRequest<
super::UpdateClusterExternalDictionaryRequest,
>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.ClusterService/UpdateExternalDictionary",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"UpdateExternalDictionary",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes the specified external dictionary.
pub async fn delete_external_dictionary(
&mut self,
request: impl tonic::IntoRequest<
super::DeleteClusterExternalDictionaryRequest,
>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.ClusterService/DeleteExternalDictionary",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ClusterService",
"DeleteExternalDictionary",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDatabaseRequest {
/// ID of the ClickHouse cluster that the database belongs to.
/// To get the cluster ID, use a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the ClickHouse Database resource to return.
/// To get the name of the database, use a \[DatabaseService.List\] request.
#[prost(string, tag = "2")]
pub database_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDatabasesRequest {
/// ID of the ClickHouse cluster to list databases in.
/// To get the cluster ID, use a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// The maximum number of results per page to return. If the number of available
/// results is larger than \[page_size\], the service returns a \[ListDatabasesResponse.next_page_token\]
/// that can be used to get the next page of results in subsequent list requests.
#[prost(int64, tag = "2")]
pub page_size: i64,
/// Page token. to get the next page of results, set \[page_token\] to the \[ListDatabasesResponse.next_page_token\]
/// returned by the previous list request.
#[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 ListDatabasesResponse {
/// List of ClickHouse databases.
#[prost(message, repeated, tag = "1")]
pub databases: ::prost::alloc::vec::Vec<Database>,
/// This token allows you to get the next page of results for list requests. If the number of results
/// is larger than \[ListDatabasesRequest.page_size\], use the \[next_page_token\] as the value
/// for the \[ListDatabasesRequest.page_token\] parameter in the next list request. Each subsequent
/// list request will have its own \[next_page_token\] to continue paging through the results.
#[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 CreateDatabaseRequest {
/// ID of the ClickHouse cluster to create a database in.
/// To get the cluster ID, use a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Configuration of the database to create.
#[prost(message, optional, tag = "2")]
pub database_spec: ::core::option::Option<DatabaseSpec>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDatabaseMetadata {
/// ID of the ClickHouse cluster where a database is being created.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the ClickHouse database that is being created.
#[prost(string, tag = "2")]
pub database_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteDatabaseRequest {
/// ID of the ClickHouse cluster to delete a database in.
/// To get the cluster ID, use a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the database to delete.
/// To get the name of the database, use a \[DatabaseService.List\] request.
#[prost(string, tag = "2")]
pub database_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteDatabaseMetadata {
/// ID of the ClickHouse cluster where a database is being deleted.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the ClickHouse database that is being deleted.
#[prost(string, tag = "2")]
pub database_name: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod database_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// A set of methods for managing ClickHouse Database resources.
/// NOTE: these methods are available only if database management through SQL is disabled.
#[derive(Debug, Clone)]
pub struct DatabaseServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl DatabaseServiceClient<tonic::transport::Channel> {
/// Attempt to create a new client by connecting to a given endpoint.
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> DatabaseServiceClient<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,
) -> DatabaseServiceClient<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,
{
DatabaseServiceClient::new(InterceptedService::new(inner, interceptor))
}
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Limits the maximum size of a decoded message.
///
/// Default: `4MB`
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
/// Limits the maximum size of an encoded message.
///
/// Default: `usize::MAX`
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// Returns the specified ClickHouse Database resource.
///
/// To get the list of available ClickHouse Database resources, make a [List] request.
pub async fn get(
&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(
"/yandex.cloud.mdb.clickhouse.v1.DatabaseService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.DatabaseService",
"Get",
),
);
self.inner.unary(req, path, codec).await
}
/// Retrieves the list of ClickHouse Database resources in the specified cluster.
pub async fn list(
&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(
"/yandex.cloud.mdb.clickhouse.v1.DatabaseService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.DatabaseService",
"List",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new ClickHouse database in the specified cluster.
pub async fn create(
&mut self,
request: impl tonic::IntoRequest<super::CreateDatabaseRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.DatabaseService/Create",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.DatabaseService",
"Create",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes the specified ClickHouse database.
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeleteDatabaseRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.DatabaseService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.DatabaseService",
"Delete",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FormatSchema {
/// Format schema name.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// ClickHouse cluster ID.
#[prost(string, tag = "2")]
pub cluster_id: ::prost::alloc::string::String,
/// Schema type. Possible values are the following:
///
/// * FORMAT_SCHEMA_TYPE_PROTOBUF - \[Protobuf\](<https://protobuf.dev/>) data format (including \[ProtobufSingle\](<https://clickhouse.com/docs/en/interfaces/formats#protobufsingle>)).
/// * FORMAT_SCHEMA_TYPE_CAPNPROTO - [Cap'n Proto](<https://capnproto.org/>) data format.
#[prost(enumeration = "FormatSchemaType", tag = "3")]
pub r#type: i32,
/// Link to the file of a format schema in Yandex Object Storage. Managed Service for ClickHouse works only with format schemas imported to Object Storage.
#[prost(string, tag = "4")]
pub uri: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum FormatSchemaType {
Unspecified = 0,
Protobuf = 1,
Capnproto = 2,
}
impl FormatSchemaType {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
FormatSchemaType::Unspecified => "FORMAT_SCHEMA_TYPE_UNSPECIFIED",
FormatSchemaType::Protobuf => "FORMAT_SCHEMA_TYPE_PROTOBUF",
FormatSchemaType::Capnproto => "FORMAT_SCHEMA_TYPE_CAPNPROTO",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"FORMAT_SCHEMA_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"FORMAT_SCHEMA_TYPE_PROTOBUF" => Some(Self::Protobuf),
"FORMAT_SCHEMA_TYPE_CAPNPROTO" => Some(Self::Capnproto),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetFormatSchemaRequest {
/// ClickHouse cluster ID.
///
/// To get a ClickHouse cluster ID, use the \[ClusterService.List\] method.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Format schema name.
///
/// To get a format schema name, use the \[FormatSchemaService.List\] method.
#[prost(string, tag = "2")]
pub format_schema_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListFormatSchemasRequest {
/// ClickHouse cluster ID.
///
/// To get a ClickHouse cluster ID, use the \[ClusterService.List\] method.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// The maximum number of results per page to return. If the number of the results is larger than \[page_size\], the service returns \[ListFormatSchemasResponse.next_page_token\]. You can use it to get the next page of the results in subsequent requests of a format schema list.
#[prost(int64, tag = "2")]
pub page_size: i64,
/// Page token. To get the next page of results, set \[page_token\] to the \[ListFormatSchemasResponse.next_page_token\] returned by the previous format schema list request.
#[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 ListFormatSchemasResponse {
/// List of format schemas.
#[prost(message, repeated, tag = "1")]
pub format_schemas: ::prost::alloc::vec::Vec<FormatSchema>,
/// This token allows you to get the next page of results when requesting the format schema list. If the number of the results is larger than \[ListFormatSchemasRequest.page_size\], use the \[next_page_token\] as the value for the \[ListFormatSchemasRequest.page_token\] parameter in the next request. Each subsequent request will have its own \[next_page_token\] to continue paging through the results.
#[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 CreateFormatSchemaRequest {
/// ClickHouse cluster ID.
///
/// To get a ClickHouse cluster ID, use the \[ClusterService.List\] method.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Format schema name.
#[prost(string, tag = "2")]
pub format_schema_name: ::prost::alloc::string::String,
/// Schema type. Possible values are the following:
///
/// * FORMAT_SCHEMA_TYPE_PROTOBUF - \[Protobuf\](<https://protobuf.dev/>) data format (including \[ProtobufSingle\](<https://clickhouse.com/docs/en/interfaces/formats#protobufsingle>)).
/// * FORMAT_SCHEMA_TYPE_CAPNPROTO - [Cap'n Proto](<https://capnproto.org/>) data format.
#[prost(enumeration = "FormatSchemaType", tag = "3")]
pub r#type: i32,
/// [Link to the file](/docs/managed-clickhouse/operations/s3-access#get-link-to-object) of a format schema in Yandex Object Storage. Managed Service for ClickHouse works only with format schemas imported to Object Storage.
#[prost(string, tag = "4")]
pub uri: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateFormatSchemaMetadata {
/// ClickHouse cluster ID.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Format schema name.
#[prost(string, tag = "2")]
pub format_schema_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateFormatSchemaRequest {
/// ClickHouse cluster ID.
///
/// To get a ClickHouse cluster ID, use the \[ClusterService.List\] method.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Format schema name.
///
/// To get a format schema name, use the \[FormatSchemaService.List\] method.
#[prost(string, tag = "2")]
pub format_schema_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
/// [Link to the file](/docs/managed-clickhouse/operations/s3-access#get-link-to-object) of a format schema in Yandex Object Storage. Managed Service for ClickHouse works only with format schemas imported to Object Storage.
#[prost(string, tag = "4")]
pub uri: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateFormatSchemaMetadata {
/// ClickHouse cluster ID.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Format schema name.
#[prost(string, tag = "2")]
pub format_schema_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteFormatSchemaRequest {
/// ClickHouse cluster ID.
///
/// To get a ClickHouse cluster ID, use the \[ClusterService.List\] method.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Format schema name.
///
/// To get a format schema name, use the \[FormatSchemaService.List\] method.
#[prost(string, tag = "2")]
pub format_schema_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteFormatSchemaMetadata {
/// ClickHouse cluster ID.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Format schema name.
#[prost(string, tag = "2")]
pub format_schema_name: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod format_schema_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// A set of methods for managing [format schemas](https://clickhouse.com/docs/en/interfaces/formats) for input and output data.
#[derive(Debug, Clone)]
pub struct FormatSchemaServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl FormatSchemaServiceClient<tonic::transport::Channel> {
/// Attempt to create a new client by connecting to a given endpoint.
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> FormatSchemaServiceClient<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,
) -> FormatSchemaServiceClient<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,
{
FormatSchemaServiceClient::new(InterceptedService::new(inner, interceptor))
}
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Limits the maximum size of a decoded message.
///
/// Default: `4MB`
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
/// Limits the maximum size of an encoded message.
///
/// Default: `usize::MAX`
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// Returns detailed information about a given format schema.
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::GetFormatSchemaRequest>,
) -> std::result::Result<tonic::Response<super::FormatSchema>, 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.mdb.clickhouse.v1.FormatSchemaService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.FormatSchemaService",
"Get",
),
);
self.inner.unary(req, path, codec).await
}
/// Returns a list of format schemas in a cluster.
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::ListFormatSchemasRequest>,
) -> std::result::Result<
tonic::Response<super::ListFormatSchemasResponse>,
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.mdb.clickhouse.v1.FormatSchemaService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.FormatSchemaService",
"List",
),
);
self.inner.unary(req, path, codec).await
}
/// Adds a format schema to a cluster.
pub async fn create(
&mut self,
request: impl tonic::IntoRequest<super::CreateFormatSchemaRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.FormatSchemaService/Create",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.FormatSchemaService",
"Create",
),
);
self.inner.unary(req, path, codec).await
}
/// Changes a format schema.
pub async fn update(
&mut self,
request: impl tonic::IntoRequest<super::UpdateFormatSchemaRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.FormatSchemaService/Update",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.FormatSchemaService",
"Update",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a format schema from a cluster.
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeleteFormatSchemaRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.FormatSchemaService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.FormatSchemaService",
"Delete",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MlModel {
/// Name of the the model.
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
/// ID of the ClickHouse cluster that the model belongs to.
#[prost(string, tag = "2")]
pub cluster_id: ::prost::alloc::string::String,
/// Type of the model.
#[prost(enumeration = "MlModelType", tag = "3")]
pub r#type: i32,
/// Model file URL. You can only use models stored in Object Storage.
#[prost(string, tag = "4")]
pub uri: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MlModelType {
Unspecified = 0,
/// CatBoost model.
Catboost = 1,
}
impl MlModelType {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
MlModelType::Unspecified => "ML_MODEL_TYPE_UNSPECIFIED",
MlModelType::Catboost => "ML_MODEL_TYPE_CATBOOST",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ML_MODEL_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"ML_MODEL_TYPE_CATBOOST" => Some(Self::Catboost),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMlModelRequest {
/// ID of the cluster that the model belongs to.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the model to return.
///
/// To get a model name make a \[MlModelService.List\] request.
#[prost(string, tag = "2")]
pub ml_model_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMlModelsRequest {
/// ID of the cluster that models belongs to.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// The maximum number of results per page to return. If the number of available
/// results is larger than `page_size`, the service returns a \[ListMlModelsResponse.next_page_token\]
/// that can be used to get the next page of results in subsequent list requests.
/// Default value: 100.
#[prost(int64, tag = "2")]
pub page_size: i64,
/// Page token. To get the next page of results, set `page_token` to the
/// \[ListMlModelsResponse.next_page_token\] returned by the previous list request.
#[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 ListMlModelsResponse {
/// List of models in the specified cluster.
#[prost(message, repeated, tag = "1")]
pub ml_models: ::prost::alloc::vec::Vec<MlModel>,
/// Token for getting the next page of the list. If the number of results is greater than
/// the specified \[ListMlModelsRequest.page_size\], use `next_page_token` as the value
/// for the \[ListMlModelsRequest.page_token\] parameter in the next list request.
///
/// Each subsequent page will have its own `next_page_token` to continue paging through the results.
#[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 CreateMlModelRequest {
/// ID of the cluster to create a model in.
///
/// To get a cluster ID make a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Model name. The model name is one of the arguments of the modelEvaluate() function, which is used to call the model in ClickHouse.
#[prost(string, tag = "2")]
pub ml_model_name: ::prost::alloc::string::String,
/// Type of the model.
#[prost(enumeration = "MlModelType", tag = "3")]
pub r#type: i32,
/// Model file URL. You can only use models stored in Object Storage.
#[prost(string, tag = "4")]
pub uri: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateMlModelMetadata {
/// ID of the cluster that a model is being added to.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the the model that is being created.
#[prost(string, tag = "2")]
pub ml_model_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateMlModelRequest {
/// ID of the cluster to update the model in.
///
/// To get a cluster ID make a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the the model to update.
#[prost(string, tag = "2")]
pub ml_model_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
/// The new model file URL. You can only use models stored in Object Storage.
#[prost(string, tag = "4")]
pub uri: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateMlModelMetadata {
/// ID of the cluster that contains the model being updated.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the the model that is being updated.
#[prost(string, tag = "2")]
pub ml_model_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteMlModelRequest {
/// ID of the cluster to delete the model in.
///
/// To get a cluster ID make a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the the model to delete.
#[prost(string, tag = "2")]
pub ml_model_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteMlModelMetadata {
/// ID of the cluster that contains the model being deleted.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the the model that is being deleted.
#[prost(string, tag = "2")]
pub ml_model_name: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod ml_model_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// A set of methods for managing machine learning models.
#[derive(Debug, Clone)]
pub struct MlModelServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl MlModelServiceClient<tonic::transport::Channel> {
/// Attempt to create a new client by connecting to a given endpoint.
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> MlModelServiceClient<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,
) -> MlModelServiceClient<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,
{
MlModelServiceClient::new(InterceptedService::new(inner, interceptor))
}
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Limits the maximum size of a decoded message.
///
/// Default: `4MB`
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
/// Limits the maximum size of an encoded message.
///
/// Default: `usize::MAX`
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// Returns the specified machine learning model.
///
/// To get the list of all available models, make a [List] request.
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::GetMlModelRequest>,
) -> std::result::Result<tonic::Response<super::MlModel>, 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.mdb.clickhouse.v1.MlModelService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.MlModelService",
"Get",
),
);
self.inner.unary(req, path, codec).await
}
/// Retrieves the list of machine learning models in the specified cluster.
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::ListMlModelsRequest>,
) -> std::result::Result<
tonic::Response<super::ListMlModelsResponse>,
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.mdb.clickhouse.v1.MlModelService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.MlModelService",
"List",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a machine learning model in the specified cluster.
pub async fn create(
&mut self,
request: impl tonic::IntoRequest<super::CreateMlModelRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.MlModelService/Create",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.MlModelService",
"Create",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates the specified machine learning model.
pub async fn update(
&mut self,
request: impl tonic::IntoRequest<super::UpdateMlModelRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.MlModelService/Update",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.MlModelService",
"Update",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes the specified machine learning model.
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeleteMlModelRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.MlModelService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.MlModelService",
"Delete",
),
);
self.inner.unary(req, path, codec).await
}
}
}
/// A ResourcePreset resource for describing hardware configuration presets.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourcePreset {
/// ID of the ResourcePreset resource.
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// IDs of availability zones where the resource preset is available.
#[prost(string, repeated, tag = "2")]
pub zone_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Number of CPU cores for a ClickHouse host created with the preset.
#[prost(int64, tag = "3")]
pub cores: i64,
/// RAM volume for a ClickHouse host created with the preset, in bytes.
#[prost(int64, tag = "4")]
pub memory: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetResourcePresetRequest {
/// ID of the resource preset to return.
/// To get the resource preset ID, use a \[ResourcePresetService.List\] request.
#[prost(string, tag = "1")]
pub resource_preset_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListResourcePresetsRequest {
/// The maximum number of results per page to return. If the number of available
/// results is larger than \[page_size\], the service returns a \[ListResourcePresetsResponse.next_page_token\]
/// that can be used to get the next page of results in subsequent list requests.
#[prost(int64, tag = "2")]
pub page_size: i64,
/// Page token. To get the next page of results, Set \[page_token\] to the \[ListResourcePresetsResponse.next_page_token\]
/// returned by the previous list request.
#[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 ListResourcePresetsResponse {
/// List of ResourcePreset resources.
#[prost(message, repeated, tag = "1")]
pub resource_presets: ::prost::alloc::vec::Vec<ResourcePreset>,
/// This token allows you to get the next page of results for list requests. If the number of results
/// is larger than \[ListResourcePresetsRequest.page_size\], use the \[next_page_token\] as the value
/// for the \[ListResourcePresetsRequest.page_token\] parameter in the next list request. Each subsequent
/// list request will have its own \[next_page_token\] to continue paging through the results.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod resource_preset_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// A set of methods for managing ResourcePreset resources.
#[derive(Debug, Clone)]
pub struct ResourcePresetServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl ResourcePresetServiceClient<tonic::transport::Channel> {
/// Attempt to create a new client by connecting to a given endpoint.
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> ResourcePresetServiceClient<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,
) -> ResourcePresetServiceClient<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,
{
ResourcePresetServiceClient::new(InterceptedService::new(inner, interceptor))
}
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Limits the maximum size of a decoded message.
///
/// Default: `4MB`
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
/// Limits the maximum size of an encoded message.
///
/// Default: `usize::MAX`
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// Returns the specified ResourcePreset resource.
///
/// To get the list of available ResourcePreset resources, make a [List] request.
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::GetResourcePresetRequest>,
) -> std::result::Result<tonic::Response<super::ResourcePreset>, 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.mdb.clickhouse.v1.ResourcePresetService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ResourcePresetService",
"Get",
),
);
self.inner.unary(req, path, codec).await
}
/// Retrieves the list of available ResourcePreset resources.
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::ListResourcePresetsRequest>,
) -> std::result::Result<
tonic::Response<super::ListResourcePresetsResponse>,
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.mdb.clickhouse.v1.ResourcePresetService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.ResourcePresetService",
"List",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetUserRequest {
/// ID of the ClickHouse cluster the user belongs to.
/// To get the cluster ID, use a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the ClickHouse User resource to return.
/// To get the name of the user, use a \[UserService.List\] request.
#[prost(string, tag = "2")]
pub user_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListUsersRequest {
/// ID of the cluster to list ClickHouse users in.
/// To get the cluster ID, use a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// The maximum number of results per page to return. If the number of available
/// results is larger than \[page_size\], the service returns a \[ListUsersResponse.next_page_token\]
/// that can be used to get the next page of results in subsequent list requests.
#[prost(int64, tag = "2")]
pub page_size: i64,
/// Page token. To get the next page of results, set \[page_token\] to the \[ListUsersResponse.next_page_token\]
/// returned by the previous list request.
#[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 ListUsersResponse {
/// List of ClickHouse User resources.
#[prost(message, repeated, tag = "1")]
pub users: ::prost::alloc::vec::Vec<User>,
/// This token allows you to get the next page of results for list requests. If the number of results
/// is larger than \[ListUsersRequest.page_size\], use the \[next_page_token\] as the value
/// for the \[ListUsersRequest.page_token\] parameter in the next list request. Each subsequent
/// list request will have its own \[next_page_token\] to continue paging through the results.
#[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 CreateUserRequest {
/// ID of the ClickHouse cluster to create a user in.
/// To get the cluster ID, use a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Properties of the user to be created.
#[prost(message, optional, tag = "2")]
pub user_spec: ::core::option::Option<UserSpec>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateUserMetadata {
/// ID of the ClickHouse cluster the user is being created in.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the user that is being created.
#[prost(string, tag = "2")]
pub user_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateUserRequest {
/// ID of the ClickHouse cluster the user belongs to.
/// To get the cluster ID, use a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the user to be updated.
/// To get the name of the user, use a \[UserService.List\] request.
#[prost(string, tag = "2")]
pub user_name: ::prost::alloc::string::String,
/// Field mask that specifies which attributes of the ClickHouse user should be updated.
#[prost(message, optional, tag = "3")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
/// New password for the user.
#[prost(string, tag = "4")]
pub password: ::prost::alloc::string::String,
/// New set of permissions for the user.
#[prost(message, repeated, tag = "5")]
pub permissions: ::prost::alloc::vec::Vec<Permission>,
#[prost(message, optional, tag = "6")]
pub settings: ::core::option::Option<UserSettings>,
#[prost(message, repeated, tag = "7")]
pub quotas: ::prost::alloc::vec::Vec<UserQuota>,
/// Generate password using Connection Manager.
#[prost(message, optional, tag = "8")]
pub generate_password: ::core::option::Option<bool>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateUserMetadata {
/// ID of the ClickHouse cluster the user belongs to.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the user that is being updated.
#[prost(string, tag = "2")]
pub user_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteUserRequest {
/// ID of the ClickHouse cluster the user belongs to.
/// To get the cluster ID, use a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the user to delete.
/// To get the name of the user, use a \[UserService.List\] request.
#[prost(string, tag = "2")]
pub user_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteUserMetadata {
/// ID of the ClickHouse cluster the user belongs to.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the user that is being deleted.
#[prost(string, tag = "2")]
pub user_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GrantUserPermissionRequest {
/// ID of the ClickHouse cluster the user belongs to.
/// To get the cluster ID, use a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the user to grant the permission to.
/// To get the name of the user, use a \[UserService.List\] request.
#[prost(string, tag = "2")]
pub user_name: ::prost::alloc::string::String,
/// Permission that should be granted to the specified user.
#[prost(message, optional, tag = "3")]
pub permission: ::core::option::Option<Permission>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GrantUserPermissionMetadata {
/// ID of the ClickHouse cluster the user belongs to.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the user that is being granted a permission.
#[prost(string, tag = "2")]
pub user_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RevokeUserPermissionRequest {
/// ID of the ClickHouse cluster the user belongs to.
/// To get the cluster ID, use a \[ClusterService.List\] request.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the user to revoke a permission from.
/// To get the name of the user, use a \[UserService.List\] request.
#[prost(string, tag = "2")]
pub user_name: ::prost::alloc::string::String,
/// Name of the database that the user should lose access to.
#[prost(string, tag = "3")]
pub database_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RevokeUserPermissionMetadata {
/// ID of the ClickHouse cluster the user belongs to.
#[prost(string, tag = "1")]
pub cluster_id: ::prost::alloc::string::String,
/// Name of the user whose permission is being revoked.
#[prost(string, tag = "2")]
pub user_name: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod user_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// A set of methods for managing ClickHouse User resources.
/// NOTE: these methods are available only if user management through SQL is disabled.
#[derive(Debug, Clone)]
pub struct UserServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl UserServiceClient<tonic::transport::Channel> {
/// Attempt to create a new client by connecting to a given endpoint.
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> UserServiceClient<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,
) -> UserServiceClient<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,
{
UserServiceClient::new(InterceptedService::new(inner, interceptor))
}
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Limits the maximum size of a decoded message.
///
/// Default: `4MB`
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
/// Limits the maximum size of an encoded message.
///
/// Default: `usize::MAX`
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// Returns the specified ClickHouse User resource.
///
/// To get the list of available ClickHouse User resources, make a [List] request.
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::GetUserRequest>,
) -> std::result::Result<tonic::Response<super::User>, 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.mdb.clickhouse.v1.UserService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.mdb.clickhouse.v1.UserService", "Get"),
);
self.inner.unary(req, path, codec).await
}
/// Retrieves the list of ClickHouse User resources in the specified cluster.
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::ListUsersRequest>,
) -> std::result::Result<
tonic::Response<super::ListUsersResponse>,
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.mdb.clickhouse.v1.UserService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.mdb.clickhouse.v1.UserService", "List"),
);
self.inner.unary(req, path, codec).await
}
/// Creates a ClickHouse user in the specified cluster.
pub async fn create(
&mut self,
request: impl tonic::IntoRequest<super::CreateUserRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.UserService/Create",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.UserService",
"Create",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates the specified ClickHouse user.
pub async fn update(
&mut self,
request: impl tonic::IntoRequest<super::UpdateUserRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.UserService/Update",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.UserService",
"Update",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes the specified ClickHouse user.
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeleteUserRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.UserService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.UserService",
"Delete",
),
);
self.inner.unary(req, path, codec).await
}
/// Grants a permission to the specified ClickHouse user.
pub async fn grant_permission(
&mut self,
request: impl tonic::IntoRequest<super::GrantUserPermissionRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.UserService/GrantPermission",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.UserService",
"GrantPermission",
),
);
self.inner.unary(req, path, codec).await
}
/// Revokes a permission from the specified ClickHouse user.
pub async fn revoke_permission(
&mut self,
request: impl tonic::IntoRequest<super::RevokeUserPermissionRequest>,
) -> std::result::Result<
tonic::Response<super::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.mdb.clickhouse.v1.UserService/RevokePermission",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.UserService",
"RevokePermission",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Version {
/// ID of the version.
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// Name of the version.
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
/// Whether version is deprecated.
#[prost(bool, tag = "3")]
pub deprecated: bool,
/// List of versions that can be updated from current.
#[prost(string, repeated, tag = "4")]
pub updatable_to: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListVersionsRequest {
/// The maximum number of results per page that should be returned. If the number of available
/// results is larger than \[page_size\], the service returns a \[ListVersionsResponse.next_page_token\] that can be used
/// to get the next page of results in subsequent ListVersions requests.
/// Default value: 100.
#[prost(int64, tag = "1")]
pub page_size: i64,
/// Page token. Set \[page_token\] to the \[ListVersionsResponse.next_page_token\] returned by a previous ListVersions
/// request to get the next page of results.
#[prost(string, tag = "2")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListVersionsResponse {
/// Requested list of available versions.
#[prost(message, repeated, tag = "1")]
pub version: ::prost::alloc::vec::Vec<Version>,
/// This token allows you to get the next page of results for ListVersions requests,
/// if the number of results is larger than \[ListVersionsRequest.page_size\] specified in the request.
/// To get the next page, specify the value of \[next_page_token\] as a value for
/// the \[ListVersionsRequest.page_token\] parameter in the next ListVerions request. Subsequent ListVersions
/// requests will have their own \[next_page_token\] to continue paging through the results.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod versions_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// A set of methods for managing ClickHouse versions.
#[derive(Debug, Clone)]
pub struct VersionsServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl VersionsServiceClient<tonic::transport::Channel> {
/// Attempt to create a new client by connecting to a given endpoint.
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> VersionsServiceClient<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,
) -> VersionsServiceClient<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,
{
VersionsServiceClient::new(InterceptedService::new(inner, interceptor))
}
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Limits the maximum size of a decoded message.
///
/// Default: `4MB`
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
/// Limits the maximum size of an encoded message.
///
/// Default: `usize::MAX`
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// Returns list of available ClickHouse versions.
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::ListVersionsRequest>,
) -> std::result::Result<
tonic::Response<super::ListVersionsResponse>,
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.mdb.clickhouse.v1.VersionsService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.mdb.clickhouse.v1.VersionsService",
"List",
),
);
self.inner.unary(req, path, codec).await
}
}
}