#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ArrowSchema {
#[prost(bytes = "bytes", tag = "1")]
pub serialized_schema: ::prost::bytes::Bytes,
}
impl ::prost::Name for ArrowSchema {
const NAME: &'static str = "ArrowSchema";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.ArrowSchema".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.ArrowSchema".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ArrowRecordBatch {
#[prost(bytes = "bytes", tag = "1")]
pub serialized_record_batch: ::prost::bytes::Bytes,
#[deprecated]
#[prost(int64, tag = "2")]
pub row_count: i64,
}
impl ::prost::Name for ArrowRecordBatch {
const NAME: &'static str = "ArrowRecordBatch";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.ArrowRecordBatch".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.ArrowRecordBatch".into()
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ArrowSerializationOptions {
#[prost(enumeration = "arrow_serialization_options::CompressionCodec", tag = "2")]
pub buffer_compression: i32,
#[prost(
enumeration = "arrow_serialization_options::PicosTimestampPrecision",
tag = "3"
)]
pub picos_timestamp_precision: i32,
}
pub mod arrow_serialization_options {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum CompressionCodec {
CompressionUnspecified = 0,
Lz4Frame = 1,
Zstd = 2,
}
impl CompressionCodec {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::CompressionUnspecified => "COMPRESSION_UNSPECIFIED",
Self::Lz4Frame => "LZ4_FRAME",
Self::Zstd => "ZSTD",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"COMPRESSION_UNSPECIFIED" => Some(Self::CompressionUnspecified),
"LZ4_FRAME" => Some(Self::Lz4Frame),
"ZSTD" => Some(Self::Zstd),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum PicosTimestampPrecision {
Unspecified = 0,
TimestampPrecisionMicros = 1,
TimestampPrecisionNanos = 2,
TimestampPrecisionPicos = 3,
}
impl PicosTimestampPrecision {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "PICOS_TIMESTAMP_PRECISION_UNSPECIFIED",
Self::TimestampPrecisionMicros => "TIMESTAMP_PRECISION_MICROS",
Self::TimestampPrecisionNanos => "TIMESTAMP_PRECISION_NANOS",
Self::TimestampPrecisionPicos => "TIMESTAMP_PRECISION_PICOS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PICOS_TIMESTAMP_PRECISION_UNSPECIFIED" => Some(Self::Unspecified),
"TIMESTAMP_PRECISION_MICROS" => Some(Self::TimestampPrecisionMicros),
"TIMESTAMP_PRECISION_NANOS" => Some(Self::TimestampPrecisionNanos),
"TIMESTAMP_PRECISION_PICOS" => Some(Self::TimestampPrecisionPicos),
_ => None,
}
}
}
}
impl ::prost::Name for ArrowSerializationOptions {
const NAME: &'static str = "ArrowSerializationOptions";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.ArrowSerializationOptions".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.ArrowSerializationOptions"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AvroSchema {
#[prost(string, tag = "1")]
pub schema: ::prost::alloc::string::String,
}
impl ::prost::Name for AvroSchema {
const NAME: &'static str = "AvroSchema";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.AvroSchema".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.AvroSchema".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AvroRows {
#[prost(bytes = "bytes", tag = "1")]
pub serialized_binary_rows: ::prost::bytes::Bytes,
#[deprecated]
#[prost(int64, tag = "2")]
pub row_count: i64,
}
impl ::prost::Name for AvroRows {
const NAME: &'static str = "AvroRows";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.AvroRows".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.AvroRows".into()
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AvroSerializationOptions {
#[prost(bool, tag = "1")]
pub enable_display_name_attribute: bool,
#[prost(
enumeration = "avro_serialization_options::PicosTimestampPrecision",
tag = "2"
)]
pub picos_timestamp_precision: i32,
}
pub mod avro_serialization_options {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum PicosTimestampPrecision {
Unspecified = 0,
TimestampPrecisionMicros = 1,
TimestampPrecisionNanos = 2,
TimestampPrecisionPicos = 3,
}
impl PicosTimestampPrecision {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "PICOS_TIMESTAMP_PRECISION_UNSPECIFIED",
Self::TimestampPrecisionMicros => "TIMESTAMP_PRECISION_MICROS",
Self::TimestampPrecisionNanos => "TIMESTAMP_PRECISION_NANOS",
Self::TimestampPrecisionPicos => "TIMESTAMP_PRECISION_PICOS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PICOS_TIMESTAMP_PRECISION_UNSPECIFIED" => Some(Self::Unspecified),
"TIMESTAMP_PRECISION_MICROS" => Some(Self::TimestampPrecisionMicros),
"TIMESTAMP_PRECISION_NANOS" => Some(Self::TimestampPrecisionNanos),
"TIMESTAMP_PRECISION_PICOS" => Some(Self::TimestampPrecisionPicos),
_ => None,
}
}
}
}
impl ::prost::Name for AvroSerializationOptions {
const NAME: &'static str = "AvroSerializationOptions";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.AvroSerializationOptions".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.AvroSerializationOptions"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoSchema {
#[prost(message, optional, tag = "1")]
pub proto_descriptor: ::core::option::Option<::prost_types::DescriptorProto>,
}
impl ::prost::Name for ProtoSchema {
const NAME: &'static str = "ProtoSchema";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.ProtoSchema".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.ProtoSchema".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProtoRows {
#[prost(bytes = "bytes", repeated, tag = "1")]
pub serialized_rows: ::prost::alloc::vec::Vec<::prost::bytes::Bytes>,
}
impl ::prost::Name for ProtoRows {
const NAME: &'static str = "ProtoRows";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.ProtoRows".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.ProtoRows".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TableSchema {
#[prost(message, repeated, tag = "1")]
pub fields: ::prost::alloc::vec::Vec<TableFieldSchema>,
}
impl ::prost::Name for TableSchema {
const NAME: &'static str = "TableSchema";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.TableSchema".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.TableSchema".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TableFieldSchema {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(enumeration = "table_field_schema::Type", tag = "2")]
pub r#type: i32,
#[prost(enumeration = "table_field_schema::Mode", tag = "3")]
pub mode: i32,
#[prost(message, repeated, tag = "4")]
pub fields: ::prost::alloc::vec::Vec<TableFieldSchema>,
#[prost(string, tag = "6")]
pub description: ::prost::alloc::string::String,
#[prost(int64, tag = "7")]
pub max_length: i64,
#[prost(int64, tag = "8")]
pub precision: i64,
#[prost(int64, tag = "9")]
pub scale: i64,
#[prost(string, tag = "10")]
pub default_value_expression: ::prost::alloc::string::String,
#[prost(message, optional, tag = "27")]
pub timestamp_precision: ::core::option::Option<i64>,
#[prost(message, optional, tag = "11")]
pub range_element_type: ::core::option::Option<table_field_schema::FieldElementType>,
}
pub mod table_field_schema {
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FieldElementType {
#[prost(enumeration = "Type", tag = "1")]
pub r#type: i32,
}
impl ::prost::Name for FieldElementType {
const NAME: &'static str = "FieldElementType";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.TableFieldSchema.FieldElementType".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.TableFieldSchema.FieldElementType"
.into()
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
Unspecified = 0,
String = 1,
Int64 = 2,
Double = 3,
Struct = 4,
Bytes = 5,
Bool = 6,
Timestamp = 7,
Date = 8,
Time = 9,
Datetime = 10,
Geography = 11,
Numeric = 12,
Bignumeric = 13,
Interval = 14,
Json = 15,
Range = 16,
}
impl Type {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "TYPE_UNSPECIFIED",
Self::String => "STRING",
Self::Int64 => "INT64",
Self::Double => "DOUBLE",
Self::Struct => "STRUCT",
Self::Bytes => "BYTES",
Self::Bool => "BOOL",
Self::Timestamp => "TIMESTAMP",
Self::Date => "DATE",
Self::Time => "TIME",
Self::Datetime => "DATETIME",
Self::Geography => "GEOGRAPHY",
Self::Numeric => "NUMERIC",
Self::Bignumeric => "BIGNUMERIC",
Self::Interval => "INTERVAL",
Self::Json => "JSON",
Self::Range => "RANGE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"STRING" => Some(Self::String),
"INT64" => Some(Self::Int64),
"DOUBLE" => Some(Self::Double),
"STRUCT" => Some(Self::Struct),
"BYTES" => Some(Self::Bytes),
"BOOL" => Some(Self::Bool),
"TIMESTAMP" => Some(Self::Timestamp),
"DATE" => Some(Self::Date),
"TIME" => Some(Self::Time),
"DATETIME" => Some(Self::Datetime),
"GEOGRAPHY" => Some(Self::Geography),
"NUMERIC" => Some(Self::Numeric),
"BIGNUMERIC" => Some(Self::Bignumeric),
"INTERVAL" => Some(Self::Interval),
"JSON" => Some(Self::Json),
"RANGE" => Some(Self::Range),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Mode {
Unspecified = 0,
Nullable = 1,
Required = 2,
Repeated = 3,
}
impl Mode {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "MODE_UNSPECIFIED",
Self::Nullable => "NULLABLE",
Self::Required => "REQUIRED",
Self::Repeated => "REPEATED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MODE_UNSPECIFIED" => Some(Self::Unspecified),
"NULLABLE" => Some(Self::Nullable),
"REQUIRED" => Some(Self::Required),
"REPEATED" => Some(Self::Repeated),
_ => None,
}
}
}
}
impl ::prost::Name for TableFieldSchema {
const NAME: &'static str = "TableFieldSchema";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.TableFieldSchema".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.TableFieldSchema".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadSession {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub expire_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(enumeration = "DataFormat", tag = "3")]
pub data_format: i32,
#[prost(string, tag = "6")]
pub table: ::prost::alloc::string::String,
#[prost(message, optional, tag = "7")]
pub table_modifiers: ::core::option::Option<read_session::TableModifiers>,
#[prost(message, optional, tag = "8")]
pub read_options: ::core::option::Option<read_session::TableReadOptions>,
#[prost(message, repeated, tag = "10")]
pub streams: ::prost::alloc::vec::Vec<ReadStream>,
#[prost(int64, tag = "12")]
pub estimated_total_bytes_scanned: i64,
#[prost(int64, tag = "15")]
pub estimated_total_physical_file_size: i64,
#[prost(int64, tag = "14")]
pub estimated_row_count: i64,
#[prost(string, tag = "13")]
pub trace_id: ::prost::alloc::string::String,
#[prost(oneof = "read_session::Schema", tags = "4, 5")]
pub schema: ::core::option::Option<read_session::Schema>,
}
pub mod read_session {
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TableModifiers {
#[prost(message, optional, tag = "1")]
pub snapshot_time: ::core::option::Option<::prost_types::Timestamp>,
}
impl ::prost::Name for TableModifiers {
const NAME: &'static str = "TableModifiers";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.ReadSession.TableModifiers".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.ReadSession.TableModifiers"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TableReadOptions {
#[prost(string, repeated, tag = "1")]
pub selected_fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "2")]
pub row_restriction: ::prost::alloc::string::String,
#[prost(double, optional, tag = "5")]
pub sample_percentage: ::core::option::Option<f64>,
#[prost(
enumeration = "table_read_options::ResponseCompressionCodec",
optional,
tag = "6"
)]
pub response_compression_codec: ::core::option::Option<i32>,
#[prost(
oneof = "table_read_options::OutputFormatSerializationOptions",
tags = "3, 4"
)]
pub output_format_serialization_options: ::core::option::Option<
table_read_options::OutputFormatSerializationOptions,
>,
}
pub mod table_read_options {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ResponseCompressionCodec {
Unspecified = 0,
Lz4 = 2,
}
impl ResponseCompressionCodec {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "RESPONSE_COMPRESSION_CODEC_UNSPECIFIED",
Self::Lz4 => "RESPONSE_COMPRESSION_CODEC_LZ4",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"RESPONSE_COMPRESSION_CODEC_UNSPECIFIED" => Some(Self::Unspecified),
"RESPONSE_COMPRESSION_CODEC_LZ4" => Some(Self::Lz4),
_ => None,
}
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum OutputFormatSerializationOptions {
#[prost(message, tag = "3")]
ArrowSerializationOptions(super::super::ArrowSerializationOptions),
#[prost(message, tag = "4")]
AvroSerializationOptions(super::super::AvroSerializationOptions),
}
}
impl ::prost::Name for TableReadOptions {
const NAME: &'static str = "TableReadOptions";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Schema {
#[prost(message, tag = "4")]
AvroSchema(super::AvroSchema),
#[prost(message, tag = "5")]
ArrowSchema(super::ArrowSchema),
}
}
impl ::prost::Name for ReadSession {
const NAME: &'static str = "ReadSession";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.ReadSession".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.ReadSession".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReadStream {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
impl ::prost::Name for ReadStream {
const NAME: &'static str = "ReadStream";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.ReadStream".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.ReadStream".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WriteStream {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(enumeration = "write_stream::Type", tag = "2")]
pub r#type: i32,
#[prost(message, optional, tag = "3")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "4")]
pub commit_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "5")]
pub table_schema: ::core::option::Option<TableSchema>,
#[prost(enumeration = "write_stream::WriteMode", tag = "7")]
pub write_mode: i32,
#[prost(string, tag = "8")]
pub location: ::prost::alloc::string::String,
}
pub mod write_stream {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
Unspecified = 0,
Committed = 1,
Pending = 2,
Buffered = 3,
}
impl Type {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "TYPE_UNSPECIFIED",
Self::Committed => "COMMITTED",
Self::Pending => "PENDING",
Self::Buffered => "BUFFERED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"COMMITTED" => Some(Self::Committed),
"PENDING" => Some(Self::Pending),
"BUFFERED" => Some(Self::Buffered),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum WriteMode {
Unspecified = 0,
Insert = 1,
}
impl WriteMode {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "WRITE_MODE_UNSPECIFIED",
Self::Insert => "INSERT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"WRITE_MODE_UNSPECIFIED" => Some(Self::Unspecified),
"INSERT" => Some(Self::Insert),
_ => None,
}
}
}
}
impl ::prost::Name for WriteStream {
const NAME: &'static str = "WriteStream";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.WriteStream".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.WriteStream".into()
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DataFormat {
Unspecified = 0,
Avro = 1,
Arrow = 2,
}
impl DataFormat {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "DATA_FORMAT_UNSPECIFIED",
Self::Avro => "AVRO",
Self::Arrow => "ARROW",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DATA_FORMAT_UNSPECIFIED" => Some(Self::Unspecified),
"AVRO" => Some(Self::Avro),
"ARROW" => Some(Self::Arrow),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum WriteStreamView {
Unspecified = 0,
Basic = 1,
Full = 2,
}
impl WriteStreamView {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "WRITE_STREAM_VIEW_UNSPECIFIED",
Self::Basic => "BASIC",
Self::Full => "FULL",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"WRITE_STREAM_VIEW_UNSPECIFIED" => Some(Self::Unspecified),
"BASIC" => Some(Self::Basic),
"FULL" => Some(Self::Full),
_ => None,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateReadSessionRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub read_session: ::core::option::Option<ReadSession>,
#[prost(int32, tag = "3")]
pub max_stream_count: i32,
#[prost(int32, tag = "4")]
pub preferred_min_stream_count: i32,
}
impl ::prost::Name for CreateReadSessionRequest {
const NAME: &'static str = "CreateReadSessionRequest";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.CreateReadSessionRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.CreateReadSessionRequest"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReadRowsRequest {
#[prost(string, tag = "1")]
pub read_stream: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub offset: i64,
#[prost(oneof = "read_rows_request::OutputFormatSerializationOptions", tags = "5")]
pub output_format_serialization_options: ::core::option::Option<
read_rows_request::OutputFormatSerializationOptions,
>,
}
pub mod read_rows_request {
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum OutputFormatSerializationOptions {
#[prost(message, tag = "5")]
ArrowSerializationOptions(super::ArrowSerializationOptions),
}
}
impl ::prost::Name for ReadRowsRequest {
const NAME: &'static str = "ReadRowsRequest";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.ReadRowsRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.ReadRowsRequest".into()
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ThrottleState {
#[prost(int32, tag = "1")]
pub throttle_percent: i32,
}
impl ::prost::Name for ThrottleState {
const NAME: &'static str = "ThrottleState";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.ThrottleState".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.ThrottleState".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct StreamStats {
#[prost(message, optional, tag = "2")]
pub progress: ::core::option::Option<stream_stats::Progress>,
}
pub mod stream_stats {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Progress {
#[prost(double, tag = "1")]
pub at_response_start: f64,
#[prost(double, tag = "2")]
pub at_response_end: f64,
}
impl ::prost::Name for Progress {
const NAME: &'static str = "Progress";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.StreamStats.Progress".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.StreamStats.Progress"
.into()
}
}
}
impl ::prost::Name for StreamStats {
const NAME: &'static str = "StreamStats";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.StreamStats".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.StreamStats".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadRowsResponse {
#[prost(int64, tag = "6")]
pub row_count: i64,
#[prost(message, optional, tag = "2")]
pub stats: ::core::option::Option<StreamStats>,
#[prost(message, optional, tag = "5")]
pub throttle_state: ::core::option::Option<ThrottleState>,
#[prost(int64, optional, tag = "9")]
pub uncompressed_byte_size: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "10")]
pub total_estimated_row_count: ::core::option::Option<i64>,
#[prost(oneof = "read_rows_response::Rows", tags = "3, 4")]
pub rows: ::core::option::Option<read_rows_response::Rows>,
#[prost(oneof = "read_rows_response::Schema", tags = "7, 8")]
pub schema: ::core::option::Option<read_rows_response::Schema>,
}
pub mod read_rows_response {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Rows {
#[prost(message, tag = "3")]
AvroRows(super::AvroRows),
#[prost(message, tag = "4")]
ArrowRecordBatch(super::ArrowRecordBatch),
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Schema {
#[prost(message, tag = "7")]
AvroSchema(super::AvroSchema),
#[prost(message, tag = "8")]
ArrowSchema(super::ArrowSchema),
}
}
impl ::prost::Name for ReadRowsResponse {
const NAME: &'static str = "ReadRowsResponse";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.ReadRowsResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.ReadRowsResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SplitReadStreamRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(double, tag = "2")]
pub fraction: f64,
}
impl ::prost::Name for SplitReadStreamRequest {
const NAME: &'static str = "SplitReadStreamRequest";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.SplitReadStreamRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.SplitReadStreamRequest"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SplitReadStreamResponse {
#[prost(message, optional, tag = "1")]
pub primary_stream: ::core::option::Option<ReadStream>,
#[prost(message, optional, tag = "2")]
pub remainder_stream: ::core::option::Option<ReadStream>,
}
impl ::prost::Name for SplitReadStreamResponse {
const NAME: &'static str = "SplitReadStreamResponse";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.SplitReadStreamResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.SplitReadStreamResponse"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateWriteStreamRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub write_stream: ::core::option::Option<WriteStream>,
}
impl ::prost::Name for CreateWriteStreamRequest {
const NAME: &'static str = "CreateWriteStreamRequest";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.CreateWriteStreamRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.CreateWriteStreamRequest"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AppendRowsRequest {
#[prost(string, tag = "1")]
pub write_stream: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub offset: ::core::option::Option<i64>,
#[prost(string, tag = "6")]
pub trace_id: ::prost::alloc::string::String,
#[prost(
map = "string, enumeration(append_rows_request::MissingValueInterpretation)",
tag = "7"
)]
pub missing_value_interpretations: ::std::collections::HashMap<
::prost::alloc::string::String,
i32,
>,
#[prost(enumeration = "append_rows_request::MissingValueInterpretation", tag = "8")]
pub default_missing_value_interpretation: i32,
#[prost(message, optional, tag = "9")]
pub client_stats: ::core::option::Option<ClientStats>,
#[prost(oneof = "append_rows_request::Rows", tags = "4, 5")]
pub rows: ::core::option::Option<append_rows_request::Rows>,
}
pub mod append_rows_request {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ArrowData {
#[prost(message, optional, tag = "1")]
pub writer_schema: ::core::option::Option<super::ArrowSchema>,
#[prost(message, optional, tag = "2")]
pub rows: ::core::option::Option<super::ArrowRecordBatch>,
}
impl ::prost::Name for ArrowData {
const NAME: &'static str = "ArrowData";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProtoData {
#[prost(message, optional, tag = "1")]
pub writer_schema: ::core::option::Option<super::ProtoSchema>,
#[prost(message, optional, tag = "2")]
pub rows: ::core::option::Option<super::ProtoRows>,
}
impl ::prost::Name for ProtoData {
const NAME: &'static str = "ProtoData";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoData".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoData"
.into()
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum MissingValueInterpretation {
Unspecified = 0,
NullValue = 1,
DefaultValue = 2,
}
impl MissingValueInterpretation {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "MISSING_VALUE_INTERPRETATION_UNSPECIFIED",
Self::NullValue => "NULL_VALUE",
Self::DefaultValue => "DEFAULT_VALUE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MISSING_VALUE_INTERPRETATION_UNSPECIFIED" => Some(Self::Unspecified),
"NULL_VALUE" => Some(Self::NullValue),
"DEFAULT_VALUE" => Some(Self::DefaultValue),
_ => None,
}
}
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Rows {
#[prost(message, tag = "4")]
ProtoRows(ProtoData),
#[prost(message, tag = "5")]
ArrowRows(ArrowData),
}
}
impl ::prost::Name for AppendRowsRequest {
const NAME: &'static str = "AppendRowsRequest";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.AppendRowsRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.AppendRowsRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AppendRowsResponse {
#[prost(message, optional, tag = "3")]
pub updated_schema: ::core::option::Option<TableSchema>,
#[prost(message, repeated, tag = "4")]
pub row_errors: ::prost::alloc::vec::Vec<RowError>,
#[prost(string, tag = "5")]
pub write_stream: ::prost::alloc::string::String,
#[prost(oneof = "append_rows_response::Response", tags = "1, 2")]
pub response: ::core::option::Option<append_rows_response::Response>,
}
pub mod append_rows_response {
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AppendResult {
#[prost(message, optional, tag = "1")]
pub offset: ::core::option::Option<i64>,
}
impl ::prost::Name for AppendResult {
const NAME: &'static str = "AppendResult";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.AppendRowsResponse.AppendResult".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.AppendRowsResponse.AppendResult"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "1")]
AppendResult(AppendResult),
#[prost(message, tag = "2")]
Error(super::super::super::super::super::rpc::Status),
}
}
impl ::prost::Name for AppendRowsResponse {
const NAME: &'static str = "AppendRowsResponse";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.AppendRowsResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.AppendRowsResponse".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetWriteStreamRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(enumeration = "WriteStreamView", tag = "3")]
pub view: i32,
}
impl ::prost::Name for GetWriteStreamRequest {
const NAME: &'static str = "GetWriteStreamRequest";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.GetWriteStreamRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.GetWriteStreamRequest"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BatchCommitWriteStreamsRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub write_streams: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
impl ::prost::Name for BatchCommitWriteStreamsRequest {
const NAME: &'static str = "BatchCommitWriteStreamsRequest";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsRequest"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchCommitWriteStreamsResponse {
#[prost(message, optional, tag = "1")]
pub commit_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, repeated, tag = "2")]
pub stream_errors: ::prost::alloc::vec::Vec<StorageError>,
}
impl ::prost::Name for BatchCommitWriteStreamsResponse {
const NAME: &'static str = "BatchCommitWriteStreamsResponse";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsResponse"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FinalizeWriteStreamRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
impl ::prost::Name for FinalizeWriteStreamRequest {
const NAME: &'static str = "FinalizeWriteStreamRequest";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.FinalizeWriteStreamRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.FinalizeWriteStreamRequest"
.into()
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FinalizeWriteStreamResponse {
#[prost(int64, tag = "1")]
pub row_count: i64,
}
impl ::prost::Name for FinalizeWriteStreamResponse {
const NAME: &'static str = "FinalizeWriteStreamResponse";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.FinalizeWriteStreamResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.FinalizeWriteStreamResponse"
.into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FlushRowsRequest {
#[prost(string, tag = "1")]
pub write_stream: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub offset: ::core::option::Option<i64>,
}
impl ::prost::Name for FlushRowsRequest {
const NAME: &'static str = "FlushRowsRequest";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.FlushRowsRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.FlushRowsRequest".into()
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FlushRowsResponse {
#[prost(int64, tag = "1")]
pub offset: i64,
}
impl ::prost::Name for FlushRowsResponse {
const NAME: &'static str = "FlushRowsResponse";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.FlushRowsResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.FlushRowsResponse".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StorageError {
#[prost(enumeration = "storage_error::StorageErrorCode", tag = "1")]
pub code: i32,
#[prost(string, tag = "2")]
pub entity: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub error_message: ::prost::alloc::string::String,
}
pub mod storage_error {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum StorageErrorCode {
Unspecified = 0,
TableNotFound = 1,
StreamAlreadyCommitted = 2,
StreamNotFound = 3,
InvalidStreamType = 4,
InvalidStreamState = 5,
StreamFinalized = 6,
SchemaMismatchExtraFields = 7,
OffsetAlreadyExists = 8,
OffsetOutOfRange = 9,
CmekNotProvided = 10,
InvalidCmekProvided = 11,
CmekEncryptionError = 12,
KmsServiceError = 13,
KmsPermissionDenied = 14,
}
impl StorageErrorCode {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "STORAGE_ERROR_CODE_UNSPECIFIED",
Self::TableNotFound => "TABLE_NOT_FOUND",
Self::StreamAlreadyCommitted => "STREAM_ALREADY_COMMITTED",
Self::StreamNotFound => "STREAM_NOT_FOUND",
Self::InvalidStreamType => "INVALID_STREAM_TYPE",
Self::InvalidStreamState => "INVALID_STREAM_STATE",
Self::StreamFinalized => "STREAM_FINALIZED",
Self::SchemaMismatchExtraFields => "SCHEMA_MISMATCH_EXTRA_FIELDS",
Self::OffsetAlreadyExists => "OFFSET_ALREADY_EXISTS",
Self::OffsetOutOfRange => "OFFSET_OUT_OF_RANGE",
Self::CmekNotProvided => "CMEK_NOT_PROVIDED",
Self::InvalidCmekProvided => "INVALID_CMEK_PROVIDED",
Self::CmekEncryptionError => "CMEK_ENCRYPTION_ERROR",
Self::KmsServiceError => "KMS_SERVICE_ERROR",
Self::KmsPermissionDenied => "KMS_PERMISSION_DENIED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STORAGE_ERROR_CODE_UNSPECIFIED" => Some(Self::Unspecified),
"TABLE_NOT_FOUND" => Some(Self::TableNotFound),
"STREAM_ALREADY_COMMITTED" => Some(Self::StreamAlreadyCommitted),
"STREAM_NOT_FOUND" => Some(Self::StreamNotFound),
"INVALID_STREAM_TYPE" => Some(Self::InvalidStreamType),
"INVALID_STREAM_STATE" => Some(Self::InvalidStreamState),
"STREAM_FINALIZED" => Some(Self::StreamFinalized),
"SCHEMA_MISMATCH_EXTRA_FIELDS" => Some(Self::SchemaMismatchExtraFields),
"OFFSET_ALREADY_EXISTS" => Some(Self::OffsetAlreadyExists),
"OFFSET_OUT_OF_RANGE" => Some(Self::OffsetOutOfRange),
"CMEK_NOT_PROVIDED" => Some(Self::CmekNotProvided),
"INVALID_CMEK_PROVIDED" => Some(Self::InvalidCmekProvided),
"CMEK_ENCRYPTION_ERROR" => Some(Self::CmekEncryptionError),
"KMS_SERVICE_ERROR" => Some(Self::KmsServiceError),
"KMS_PERMISSION_DENIED" => Some(Self::KmsPermissionDenied),
_ => None,
}
}
}
}
impl ::prost::Name for StorageError {
const NAME: &'static str = "StorageError";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.StorageError".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.StorageError".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RowError {
#[prost(int64, tag = "1")]
pub index: i64,
#[prost(enumeration = "row_error::RowErrorCode", tag = "2")]
pub code: i32,
#[prost(string, tag = "3")]
pub message: ::prost::alloc::string::String,
}
pub mod row_error {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum RowErrorCode {
Unspecified = 0,
FieldsError = 1,
}
impl RowErrorCode {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "ROW_ERROR_CODE_UNSPECIFIED",
Self::FieldsError => "FIELDS_ERROR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ROW_ERROR_CODE_UNSPECIFIED" => Some(Self::Unspecified),
"FIELDS_ERROR" => Some(Self::FieldsError),
_ => None,
}
}
}
}
impl ::prost::Name for RowError {
const NAME: &'static str = "RowError";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.RowError".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.RowError".into()
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ClientStats {
#[prost(message, optional, tag = "1")]
pub request_stats: ::core::option::Option<client_stats::RequestStats>,
#[prost(message, optional, tag = "2")]
pub window_stats: ::core::option::Option<client_stats::WindowStats>,
}
pub mod client_stats {
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RequestStats {
#[prost(int64, optional, tag = "1")]
pub send_time_millis: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "2")]
pub queued_requests_count: ::core::option::Option<i64>,
}
impl ::prost::Name for RequestStats {
const NAME: &'static str = "RequestStats";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.ClientStats.RequestStats".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.ClientStats.RequestStats"
.into()
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WindowStats {
#[prost(int64, optional, tag = "1")]
pub max_response_latency_millis: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "2")]
pub avg_response_latency_millis: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "3")]
pub longest_wait_no_response_millis: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "4")]
pub requests_sent_count: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "5")]
pub responses_received_count: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "6")]
pub bytes_sent_count: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "7")]
pub window_start_time_epoch_millis: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "8")]
pub window_millis: ::core::option::Option<i64>,
}
impl ::prost::Name for WindowStats {
const NAME: &'static str = "WindowStats";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.ClientStats.WindowStats".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.ClientStats.WindowStats"
.into()
}
}
}
impl ::prost::Name for ClientStats {
const NAME: &'static str = "ClientStats";
const PACKAGE: &'static str = "google.cloud.bigquery.storage.v1";
fn full_name() -> ::prost::alloc::string::String {
"google.cloud.bigquery.storage.v1.ClientStats".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/google.cloud.bigquery.storage.v1.ClientStats".into()
}
}