#[non_exhaustive]pub struct GetSupportedLanguagesRequest {
pub parent: String,
pub display_language_code: String,
pub model: String,
/* private fields */
}Expand description
The request message for discovering supported languages.
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. Project or location to make a call. Must refer to a caller’s project.
Format: projects/{project-number-or-id} or
projects/{project-number-or-id}/locations/{location-id}.
For global calls, use projects/{project-number-or-id}/locations/global or
projects/{project-number-or-id}.
Non-global location is required for AutoML models.
Only models within the same region (have same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned.
display_language_code: StringOptional. The language to use to return localized, human readable names of supported languages. If missing, then display names are not returned in a response.
model: StringOptional. Get supported languages of this model.
The format depends on model type:
-
AutoML Translation models:
projects/{project-number-or-id}/locations/{location-id}/models/{model-id} -
General (built-in) models:
projects/{project-number-or-id}/locations/{location-id}/models/general/nmt,
Returns languages supported by the specified model. If missing, we get supported languages of Google general NMT model.
Implementations§
Source§impl GetSupportedLanguagesRequest
impl GetSupportedLanguagesRequest
pub fn new() -> Self
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_display_language_code<T: Into<String>>(self, v: T) -> Self
pub fn set_display_language_code<T: Into<String>>(self, v: T) -> Self
Sets the value of display_language_code.
§Example
let x = GetSupportedLanguagesRequest::new().set_display_language_code("example");Trait Implementations§
Source§impl Clone for GetSupportedLanguagesRequest
impl Clone for GetSupportedLanguagesRequest
Source§fn clone(&self) -> GetSupportedLanguagesRequest
fn clone(&self) -> GetSupportedLanguagesRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GetSupportedLanguagesRequest
impl Debug for GetSupportedLanguagesRequest
Source§impl Default for GetSupportedLanguagesRequest
impl Default for GetSupportedLanguagesRequest
Source§fn default() -> GetSupportedLanguagesRequest
fn default() -> GetSupportedLanguagesRequest
Source§impl PartialEq for GetSupportedLanguagesRequest
impl PartialEq for GetSupportedLanguagesRequest
Source§fn eq(&self, other: &GetSupportedLanguagesRequest) -> bool
fn eq(&self, other: &GetSupportedLanguagesRequest) -> bool
self and other values to be equal, and is used by ==.