Struct google_api_proto::google::cloud::translation::v3::DetectLanguageRequest
source · pub struct DetectLanguageRequest {
pub parent: String,
pub model: String,
pub mime_type: String,
pub labels: BTreeMap<String, String>,
pub source: Option<Source>,
}
Expand description
The request message for language detection.
Fields§
§parent: String
Required. Project or location to make a call. Must refer to a caller’s project.
Format: projects/{project-number-or-id}/locations/{location-id}
or
projects/{project-number-or-id}
.
For global calls, use projects/{project-number-or-id}/locations/global
or
projects/{project-number-or-id}
.
Only models within the same region (has same location-id) can be used. Otherwise an INVALID_ARGUMENT (400) error is returned.
model: String
Optional. The language detection model to be used.
Format:
projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}
Only one language detection model is currently supported:
projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default
.
If not specified, the default model is used.
mime_type: String
Optional. The format of the source text, for example, “text/html”, “text/plain”. If left blank, the MIME type defaults to “text/html”.
labels: BTreeMap<String, String>
Optional. The labels with user-defined metadata for the request.
Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.
See https://cloud.google.com/translate/docs/advanced/labels for more information.
source: Option<Source>
Required. The source of the document from which to detect the language.
Trait Implementations§
source§impl Clone for DetectLanguageRequest
impl Clone for DetectLanguageRequest
source§fn clone(&self) -> DetectLanguageRequest
fn clone(&self) -> DetectLanguageRequest
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DetectLanguageRequest
impl Debug for DetectLanguageRequest
source§impl Default for DetectLanguageRequest
impl Default for DetectLanguageRequest
source§impl Message for DetectLanguageRequest
impl Message for DetectLanguageRequest
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for DetectLanguageRequest
impl PartialEq for DetectLanguageRequest
source§fn eq(&self, other: &DetectLanguageRequest) -> bool
fn eq(&self, other: &DetectLanguageRequest) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for DetectLanguageRequest
Auto Trait Implementations§
impl Freeze for DetectLanguageRequest
impl RefUnwindSafe for DetectLanguageRequest
impl Send for DetectLanguageRequest
impl Sync for DetectLanguageRequest
impl Unpin for DetectLanguageRequest
impl UnwindSafe for DetectLanguageRequest
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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