#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TranslationConfigDetails {
#[prost(message, optional, tag = "3")]
pub source_dialect: ::core::option::Option<Dialect>,
#[prost(message, optional, tag = "4")]
pub target_dialect: ::core::option::Option<Dialect>,
#[prost(message, optional, tag = "6")]
pub source_env: ::core::option::Option<SourceEnv>,
#[prost(string, tag = "8")]
pub request_source: ::prost::alloc::string::String,
#[prost(oneof = "translation_config_details::SourceLocation", tags = "1")]
pub source_location: ::core::option::Option<
translation_config_details::SourceLocation,
>,
#[prost(oneof = "translation_config_details::TargetLocation", tags = "2")]
pub target_location: ::core::option::Option<
translation_config_details::TargetLocation,
>,
#[prost(oneof = "translation_config_details::OutputNameMapping", tags = "5")]
pub output_name_mapping: ::core::option::Option<
translation_config_details::OutputNameMapping,
>,
}
pub mod translation_config_details {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum SourceLocation {
#[prost(string, tag = "1")]
GcsSourcePath(::prost::alloc::string::String),
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum TargetLocation {
#[prost(string, tag = "2")]
GcsTargetPath(::prost::alloc::string::String),
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum OutputNameMapping {
#[prost(message, tag = "5")]
NameMappingList(super::ObjectNameMappingList),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Dialect {
#[prost(
oneof = "dialect::DialectValue",
tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14"
)]
pub dialect_value: ::core::option::Option<dialect::DialectValue>,
}
pub mod dialect {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum DialectValue {
#[prost(message, tag = "1")]
BigqueryDialect(super::BigQueryDialect),
#[prost(message, tag = "2")]
HiveqlDialect(super::HiveQlDialect),
#[prost(message, tag = "3")]
RedshiftDialect(super::RedshiftDialect),
#[prost(message, tag = "4")]
TeradataDialect(super::TeradataDialect),
#[prost(message, tag = "5")]
OracleDialect(super::OracleDialect),
#[prost(message, tag = "6")]
SparksqlDialect(super::SparkSqlDialect),
#[prost(message, tag = "7")]
SnowflakeDialect(super::SnowflakeDialect),
#[prost(message, tag = "8")]
NetezzaDialect(super::NetezzaDialect),
#[prost(message, tag = "9")]
AzureSynapseDialect(super::AzureSynapseDialect),
#[prost(message, tag = "10")]
VerticaDialect(super::VerticaDialect),
#[prost(message, tag = "11")]
SqlServerDialect(super::SqlServerDialect),
#[prost(message, tag = "12")]
PostgresqlDialect(super::PostgresqlDialect),
#[prost(message, tag = "13")]
PrestoDialect(super::PrestoDialect),
#[prost(message, tag = "14")]
MysqlDialect(super::MySqlDialect),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BigQueryDialect {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HiveQlDialect {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RedshiftDialect {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TeradataDialect {
#[prost(enumeration = "teradata_dialect::Mode", tag = "1")]
pub mode: i32,
}
pub mod teradata_dialect {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Mode {
Unspecified = 0,
Sql = 1,
Bteq = 2,
}
impl Mode {
pub fn as_str_name(&self) -> &'static str {
match self {
Mode::Unspecified => "MODE_UNSPECIFIED",
Mode::Sql => "SQL",
Mode::Bteq => "BTEQ",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MODE_UNSPECIFIED" => Some(Self::Unspecified),
"SQL" => Some(Self::Sql),
"BTEQ" => Some(Self::Bteq),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OracleDialect {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SparkSqlDialect {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SnowflakeDialect {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NetezzaDialect {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AzureSynapseDialect {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VerticaDialect {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SqlServerDialect {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PostgresqlDialect {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrestoDialect {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MySqlDialect {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ObjectNameMappingList {
#[prost(message, repeated, tag = "1")]
pub name_map: ::prost::alloc::vec::Vec<ObjectNameMapping>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ObjectNameMapping {
#[prost(message, optional, tag = "1")]
pub source: ::core::option::Option<NameMappingKey>,
#[prost(message, optional, tag = "2")]
pub target: ::core::option::Option<NameMappingValue>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NameMappingKey {
#[prost(enumeration = "name_mapping_key::Type", tag = "1")]
pub r#type: i32,
#[prost(string, tag = "2")]
pub database: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub schema: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub relation: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub attribute: ::prost::alloc::string::String,
}
pub mod name_mapping_key {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
Unspecified = 0,
Database = 1,
Schema = 2,
Relation = 3,
Attribute = 4,
RelationAlias = 5,
AttributeAlias = 6,
Function = 7,
}
impl Type {
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::Database => "DATABASE",
Type::Schema => "SCHEMA",
Type::Relation => "RELATION",
Type::Attribute => "ATTRIBUTE",
Type::RelationAlias => "RELATION_ALIAS",
Type::AttributeAlias => "ATTRIBUTE_ALIAS",
Type::Function => "FUNCTION",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"DATABASE" => Some(Self::Database),
"SCHEMA" => Some(Self::Schema),
"RELATION" => Some(Self::Relation),
"ATTRIBUTE" => Some(Self::Attribute),
"RELATION_ALIAS" => Some(Self::RelationAlias),
"ATTRIBUTE_ALIAS" => Some(Self::AttributeAlias),
"FUNCTION" => Some(Self::Function),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NameMappingValue {
#[prost(string, tag = "1")]
pub database: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub schema: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub relation: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub attribute: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SourceEnv {
#[prost(string, tag = "1")]
pub default_database: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub schema_search_path: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourceErrorDetail {
#[prost(message, optional, tag = "1")]
pub resource_info: ::core::option::Option<
super::super::super::super::rpc::ResourceInfo,
>,
#[prost(message, repeated, tag = "2")]
pub error_details: ::prost::alloc::vec::Vec<ErrorDetail>,
#[prost(int32, tag = "3")]
pub error_count: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ErrorDetail {
#[prost(message, optional, tag = "1")]
pub location: ::core::option::Option<ErrorLocation>,
#[prost(message, optional, tag = "2")]
pub error_info: ::core::option::Option<super::super::super::super::rpc::ErrorInfo>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ErrorLocation {
#[prost(int32, tag = "1")]
pub line: i32,
#[prost(int32, tag = "2")]
pub column: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimeSeries {
#[prost(string, tag = "1")]
pub metric: ::prost::alloc::string::String,
#[prost(
enumeration = "super::super::super::super::api::metric_descriptor::ValueType",
tag = "2"
)]
pub value_type: i32,
#[prost(
enumeration = "super::super::super::super::api::metric_descriptor::MetricKind",
tag = "3"
)]
pub metric_kind: i32,
#[prost(message, repeated, tag = "4")]
pub points: ::prost::alloc::vec::Vec<Point>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Point {
#[prost(message, optional, tag = "1")]
pub interval: ::core::option::Option<TimeInterval>,
#[prost(message, optional, tag = "2")]
pub value: ::core::option::Option<TypedValue>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimeInterval {
#[prost(message, optional, tag = "1")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "2")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TypedValue {
#[prost(oneof = "typed_value::Value", tags = "1, 2, 3, 4, 5")]
pub value: ::core::option::Option<typed_value::Value>,
}
pub mod typed_value {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Value {
#[prost(bool, tag = "1")]
BoolValue(bool),
#[prost(int64, tag = "2")]
Int64Value(i64),
#[prost(double, tag = "3")]
DoubleValue(f64),
#[prost(string, tag = "4")]
StringValue(::prost::alloc::string::String),
#[prost(message, tag = "5")]
DistributionValue(super::super::super::super::super::api::Distribution),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MigrationWorkflow {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub display_name: ::prost::alloc::string::String,
#[prost(btree_map = "string, message", tag = "2")]
pub tasks: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
MigrationTask,
>,
#[prost(enumeration = "migration_workflow::State", tag = "3")]
pub state: i32,
#[prost(message, optional, tag = "4")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "5")]
pub last_update_time: ::core::option::Option<::prost_types::Timestamp>,
}
pub mod migration_workflow {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
Draft = 1,
Running = 2,
Paused = 3,
Completed = 4,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Draft => "DRAFT",
State::Running => "RUNNING",
State::Paused => "PAUSED",
State::Completed => "COMPLETED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"DRAFT" => Some(Self::Draft),
"RUNNING" => Some(Self::Running),
"PAUSED" => Some(Self::Paused),
"COMPLETED" => Some(Self::Completed),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MigrationTask {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub r#type: ::prost::alloc::string::String,
#[prost(enumeration = "migration_task::State", tag = "4")]
pub state: i32,
#[prost(message, optional, tag = "5")]
pub processing_error: ::core::option::Option<
super::super::super::super::rpc::ErrorInfo,
>,
#[prost(message, optional, tag = "6")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "7")]
pub last_update_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(oneof = "migration_task::TaskDetails", tags = "14")]
pub task_details: ::core::option::Option<migration_task::TaskDetails>,
}
pub mod migration_task {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
Pending = 1,
Orchestrating = 2,
Running = 3,
Paused = 4,
Succeeded = 5,
Failed = 6,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Pending => "PENDING",
State::Orchestrating => "ORCHESTRATING",
State::Running => "RUNNING",
State::Paused => "PAUSED",
State::Succeeded => "SUCCEEDED",
State::Failed => "FAILED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"PENDING" => Some(Self::Pending),
"ORCHESTRATING" => Some(Self::Orchestrating),
"RUNNING" => Some(Self::Running),
"PAUSED" => Some(Self::Paused),
"SUCCEEDED" => Some(Self::Succeeded),
"FAILED" => Some(Self::Failed),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum TaskDetails {
#[prost(message, tag = "14")]
TranslationConfigDetails(super::TranslationConfigDetails),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MigrationSubtask {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub task_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub r#type: ::prost::alloc::string::String,
#[prost(enumeration = "migration_subtask::State", tag = "5")]
pub state: i32,
#[prost(message, optional, tag = "6")]
pub processing_error: ::core::option::Option<
super::super::super::super::rpc::ErrorInfo,
>,
#[prost(message, repeated, tag = "12")]
pub resource_error_details: ::prost::alloc::vec::Vec<ResourceErrorDetail>,
#[prost(int32, tag = "13")]
pub resource_error_count: i32,
#[prost(message, optional, tag = "7")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "8")]
pub last_update_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, repeated, tag = "11")]
pub metrics: ::prost::alloc::vec::Vec<TimeSeries>,
}
pub mod migration_subtask {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum State {
Unspecified = 0,
Active = 1,
Running = 2,
Succeeded = 3,
Failed = 4,
Paused = 5,
PendingDependency = 6,
}
impl State {
pub fn as_str_name(&self) -> &'static str {
match self {
State::Unspecified => "STATE_UNSPECIFIED",
State::Active => "ACTIVE",
State::Running => "RUNNING",
State::Succeeded => "SUCCEEDED",
State::Failed => "FAILED",
State::Paused => "PAUSED",
State::PendingDependency => "PENDING_DEPENDENCY",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATE_UNSPECIFIED" => Some(Self::Unspecified),
"ACTIVE" => Some(Self::Active),
"RUNNING" => Some(Self::Running),
"SUCCEEDED" => Some(Self::Succeeded),
"FAILED" => Some(Self::Failed),
"PAUSED" => Some(Self::Paused),
"PENDING_DEPENDENCY" => Some(Self::PendingDependency),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateMigrationWorkflowRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub migration_workflow: ::core::option::Option<MigrationWorkflow>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMigrationWorkflowRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMigrationWorkflowsRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(int32, tag = "3")]
pub page_size: i32,
#[prost(string, tag = "4")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMigrationWorkflowsResponse {
#[prost(message, repeated, tag = "1")]
pub migration_workflows: ::prost::alloc::vec::Vec<MigrationWorkflow>,
#[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 DeleteMigrationWorkflowRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartMigrationWorkflowRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMigrationSubtaskRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMigrationSubtasksRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub read_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(int32, tag = "3")]
pub page_size: i32,
#[prost(string, tag = "4")]
pub page_token: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub filter: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMigrationSubtasksResponse {
#[prost(message, repeated, tag = "1")]
pub migration_subtasks: ::prost::alloc::vec::Vec<MigrationSubtask>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
pub mod migration_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct MigrationServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> MigrationServiceClient<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,
) -> MigrationServiceClient<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,
{
MigrationServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn create_migration_workflow(
&mut self,
request: impl tonic::IntoRequest<super::CreateMigrationWorkflowRequest>,
) -> std::result::Result<
tonic::Response<super::MigrationWorkflow>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.migration.v2.MigrationService/CreateMigrationWorkflow",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.migration.v2.MigrationService",
"CreateMigrationWorkflow",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_migration_workflow(
&mut self,
request: impl tonic::IntoRequest<super::GetMigrationWorkflowRequest>,
) -> std::result::Result<
tonic::Response<super::MigrationWorkflow>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.migration.v2.MigrationService/GetMigrationWorkflow",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.migration.v2.MigrationService",
"GetMigrationWorkflow",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_migration_workflows(
&mut self,
request: impl tonic::IntoRequest<super::ListMigrationWorkflowsRequest>,
) -> std::result::Result<
tonic::Response<super::ListMigrationWorkflowsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.migration.v2.MigrationService/ListMigrationWorkflows",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.migration.v2.MigrationService",
"ListMigrationWorkflows",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete_migration_workflow(
&mut self,
request: impl tonic::IntoRequest<super::DeleteMigrationWorkflowRequest>,
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.migration.v2.MigrationService/DeleteMigrationWorkflow",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.migration.v2.MigrationService",
"DeleteMigrationWorkflow",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn start_migration_workflow(
&mut self,
request: impl tonic::IntoRequest<super::StartMigrationWorkflowRequest>,
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.migration.v2.MigrationService/StartMigrationWorkflow",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.migration.v2.MigrationService",
"StartMigrationWorkflow",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_migration_subtask(
&mut self,
request: impl tonic::IntoRequest<super::GetMigrationSubtaskRequest>,
) -> std::result::Result<
tonic::Response<super::MigrationSubtask>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.migration.v2.MigrationService/GetMigrationSubtask",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.migration.v2.MigrationService",
"GetMigrationSubtask",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_migration_subtasks(
&mut self,
request: impl tonic::IntoRequest<super::ListMigrationSubtasksRequest>,
) -> std::result::Result<
tonic::Response<super::ListMigrationSubtasksResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.cloud.bigquery.migration.v2.MigrationService/ListMigrationSubtasks",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.cloud.bigquery.migration.v2.MigrationService",
"ListMigrationSubtasks",
),
);
self.inner.unary(req, path, codec).await
}
}
}