Module tencentcloud::api
source · Expand description
the Api
trait allows user define the tencentcloud an api
Examples:
use serde::{Deserialize, Serialize};
use tencentcloud::api::Api;
#[derive(Debug, Copy, Clone)]
pub struct TextTranslate;
#[derive(Debug, Clone, Serialize)]
pub struct TextTranslateRequest {
#[serde(rename = "SourceText")]
pub source_text: String,
#[serde(rename = "Source")]
pub source: String,
#[serde(rename = "Target")]
pub target: String,
#[serde(rename = "ProjectId")]
pub project_id: i64,
}
#[derive(Debug, Clone, Deserialize)]
pub struct TextTranslateResponse {
#[serde(rename = "Source")]
pub source: String,
#[serde(rename = "Target")]
pub target: String,
#[serde(rename = "TargetText")]
pub target_text: String,
}
impl Api for TextTranslate {
type Request = TextTranslateRequest;
type Response = TextTranslateResponse;
const VERSION: &'static str = "2018-03-21";
const ACTION: &'static str = "TextTranslate";
const SERVICE: &'static str = "tmt";
const HOST: &'static str = "tmt.tencentcloudapi.com";
}
Traits
- tencentcloud api