#[non_exhaustive]pub struct CreateReadSessionRequest {
pub parent: String,
pub read_session: Option<ReadSession>,
pub max_stream_count: i32,
pub preferred_min_stream_count: i32,
/* private fields */
}Expand description
Request message for CreateReadSession.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.parent: StringRequired. The request project that owns the session, in the form of
projects/{project_id}.
read_session: Option<ReadSession>Required. Session to be created.
max_stream_count: i32Max initial number of streams. If unset or zero, the server will provide a value of streams so as to produce reasonable throughput. Must be non-negative. The number of streams may be lower than the requested number, depending on the amount parallelism that is reasonable for the table. There is a default system max limit of 1,000.
This must be greater than or equal to preferred_min_stream_count. Typically, clients should either leave this unset to let the system to determine an upper bound OR set this a size for the maximum “units of work” it can gracefully handle.
preferred_min_stream_count: i32The minimum preferred stream count. This parameter can be used to inform the service that there is a desired lower bound on the number of streams. This is typically a target parallelism of the client (e.g. a Spark cluster with N-workers would set this to a low multiple of N to ensure good cluster utilization).
The system will make a best effort to provide at least this number of streams, but in some cases might provide less.
Implementations§
Source§impl CreateReadSessionRequest
impl CreateReadSessionRequest
Sourcepub fn set_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_read_session<T>(self, v: T) -> Selfwhere
T: Into<ReadSession>,
pub fn set_read_session<T>(self, v: T) -> Selfwhere
T: Into<ReadSession>,
Sets the value of read_session.
§Example
use google_cloud_bigquery::model::ReadSession;
let x = CreateReadSessionRequest::new().set_read_session(ReadSession::default()/* use setters */);Sourcepub fn set_or_clear_read_session<T>(self, v: Option<T>) -> Selfwhere
T: Into<ReadSession>,
pub fn set_or_clear_read_session<T>(self, v: Option<T>) -> Selfwhere
T: Into<ReadSession>,
Sets or clears the value of read_session.
§Example
use google_cloud_bigquery::model::ReadSession;
let x = CreateReadSessionRequest::new().set_or_clear_read_session(Some(ReadSession::default()/* use setters */));
let x = CreateReadSessionRequest::new().set_or_clear_read_session(None::<ReadSession>);Sourcepub fn set_max_stream_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_max_stream_count<T: Into<i32>>(self, v: T) -> Self
Sets the value of max_stream_count.
§Example
let x = CreateReadSessionRequest::new().set_max_stream_count(42);Sourcepub fn set_preferred_min_stream_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_preferred_min_stream_count<T: Into<i32>>(self, v: T) -> Self
Sets the value of preferred_min_stream_count.
§Example
let x = CreateReadSessionRequest::new().set_preferred_min_stream_count(42);Trait Implementations§
Source§impl Clone for CreateReadSessionRequest
impl Clone for CreateReadSessionRequest
Source§impl Debug for CreateReadSessionRequest
impl Debug for CreateReadSessionRequest
Source§impl Default for CreateReadSessionRequest
impl Default for CreateReadSessionRequest
Source§impl Message for CreateReadSessionRequest
impl Message for CreateReadSessionRequest
Source§impl PartialEq for CreateReadSessionRequest
impl PartialEq for CreateReadSessionRequest
impl StructuralPartialEq for CreateReadSessionRequest
Auto Trait Implementations§
impl Freeze for CreateReadSessionRequest
impl RefUnwindSafe for CreateReadSessionRequest
impl Send for CreateReadSessionRequest
impl Sync for CreateReadSessionRequest
impl Unpin for CreateReadSessionRequest
impl UnsafeUnpin for CreateReadSessionRequest
impl UnwindSafe for CreateReadSessionRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request