Update to latest versions of API declarations

This commit is contained in:
Sebastian Thiel
2018-10-13 13:49:14 +02:00
parent 5a67475b54
commit 255c7f5ad5
1508 changed files with 819225 additions and 838421 deletions

View File

@@ -2,7 +2,7 @@
// This file was generated automatically from 'src/mako/api/lib.rs.mako'
// DO NOT EDIT !
//! This documentation was generated from *Cloud Natural Language* crate version *1.0.7+20171204*, where *20171204* is the exact revision of the *language:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.7*.
//! This documentation was generated from *Cloud Natural Language* crate version *1.0.7+20180930*, where *20180930* is the exact revision of the *language:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.7*.
//!
//! Everything else about the *Cloud Natural Language* *v1* API can be found at the
//! [official documentation site](https://cloud.google.com/natural-language/).
@@ -69,6 +69,14 @@
//! ```toml
//! [dependencies]
//! google-language1 = "*"
//! # This project intentionally uses an old version of Hyper. See
//! # https://github.com/Byron/google-apis-rs/issues/173 for more
//! # information.
//! hyper = "^0.10"
//! hyper-rustls = "^0.6"
//! serde = "^1.0"
//! serde_json = "^1.0"
//! yup-oauth2 = "^1.0"
//! ```
//!
//! ## A complete example
@@ -371,41 +379,29 @@ impl<'a, C, A> CloudNaturalLanguage<C, A>
// ############
// SCHEMAS ###
// ##########
/// Represents part of speech information for a token. Parts of speech
/// are as defined in
/// http://www.lrec-conf.org/proceedings/lrec2012/pdf/274_Paper.pdf
/// The sentiment analysis response message.
///
/// This type is not used in any activity, and only used as *part* of another schema.
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [analyze sentiment documents](struct.DocumentAnalyzeSentimentCall.html) (response)
///
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct PartOfSpeech {
/// The grammatical case.
pub case: Option<String>,
/// The grammatical reciprocity.
pub reciprocity: Option<String>,
/// The grammatical form.
pub form: Option<String>,
/// The grammatical gender.
pub gender: Option<String>,
/// The grammatical number.
pub number: Option<String>,
/// The grammatical person.
pub person: Option<String>,
/// The part of speech tag.
pub tag: Option<String>,
/// The grammatical tense.
pub tense: Option<String>,
/// The grammatical aspect.
pub aspect: Option<String>,
/// The grammatical properness.
pub proper: Option<String>,
/// The grammatical voice.
pub voice: Option<String>,
/// The grammatical mood.
pub mood: Option<String>,
pub struct AnalyzeSentimentResponse {
/// The overall sentiment of the input document.
#[serde(rename="documentSentiment")]
pub document_sentiment: Option<Sentiment>,
/// The language of the text, which will be the same as the language specified
/// in the request or, if not specified, the automatically-detected language.
/// See Document.language field for more details.
pub language: Option<String>,
/// The sentiment for all the sentences in the document.
pub sentences: Option<Vec<Sentence>>,
}
impl Part for PartOfSpeech {}
impl ResponseResult for AnalyzeSentimentResponse {}
/// Represents the feeling associated with the entire text or entities in
@@ -533,12 +529,12 @@ impl Part for DependencyEdge {}
pub struct Token {
/// The token text.
pub text: Option<TextSpan>,
/// Dependency tree parse for this token.
#[serde(rename="dependencyEdge")]
pub dependency_edge: Option<DependencyEdge>,
/// Parts of speech tag for this token.
#[serde(rename="partOfSpeech")]
pub part_of_speech: Option<PartOfSpeech>,
/// Dependency tree parse for this token.
#[serde(rename="dependencyEdge")]
pub dependency_edge: Option<DependencyEdge>,
/// [Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.
pub lemma: Option<String>,
}
@@ -565,6 +561,7 @@ impl Part for Token {}
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct Document {
/// The content of the input in string format.
/// Cloud audit logging exempt since it is based on user data.
pub content: Option<String>,
/// Required. If the type is not set or is `TYPE_UNSPECIFIED`,
/// returns an `INVALID_ARGUMENT` error.
@@ -692,7 +689,8 @@ pub struct ClassificationCategory {
/// The classifier's confidence of the category. Number represents how certain
/// the classifier is that this category represents the given text.
pub confidence: Option<f32>,
/// The name of the category representing the document.
/// The name of the category representing the document, from the [predefined
/// taxonomy](/natural-language/docs/categories).
pub name: Option<String>,
}
@@ -814,29 +812,41 @@ pub struct AnalyzeSentimentRequest {
impl RequestValue for AnalyzeSentimentRequest {}
/// The sentiment analysis response message.
/// Represents part of speech information for a token. Parts of speech
/// are as defined in
/// http://www.lrec-conf.org/proceedings/lrec2012/pdf/274_Paper.pdf
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [analyze sentiment documents](struct.DocumentAnalyzeSentimentCall.html) (response)
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct AnalyzeSentimentResponse {
/// The overall sentiment of the input document.
#[serde(rename="documentSentiment")]
pub document_sentiment: Option<Sentiment>,
/// The language of the text, which will be the same as the language specified
/// in the request or, if not specified, the automatically-detected language.
/// See Document.language field for more details.
pub language: Option<String>,
/// The sentiment for all the sentences in the document.
pub sentences: Option<Vec<Sentence>>,
pub struct PartOfSpeech {
/// The grammatical case.
pub case: Option<String>,
/// The grammatical reciprocity.
pub reciprocity: Option<String>,
/// The grammatical form.
pub form: Option<String>,
/// The grammatical gender.
pub gender: Option<String>,
/// The grammatical number.
pub number: Option<String>,
/// The grammatical person.
pub person: Option<String>,
/// The part of speech tag.
pub tag: Option<String>,
/// The grammatical tense.
pub tense: Option<String>,
/// The grammatical aspect.
pub aspect: Option<String>,
/// The grammatical properness.
pub proper: Option<String>,
/// The grammatical voice.
pub voice: Option<String>,
/// The grammatical mood.
pub mood: Option<String>,
}
impl ResponseResult for AnalyzeSentimentResponse {}
impl Part for PartOfSpeech {}
/// The syntax analysis request message.
@@ -1151,7 +1161,7 @@ impl<'a, C, A> DocumentAnalyzeSyntaxCall<'a, C, A> where C: BorrowMut<hyper::Cli
};
dlg.begin(MethodInfo { id: "language.documents.analyzeSyntax",
http_method: hyper::method::Method::Post });
let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len()));
let mut params: Vec<(&str, String)> = Vec::with_capacity(3 + self._additional_params.len());
for &field in ["alt"].iter() {
if self._additional_params.contains_key(field) {
dlg.finished(false);
@@ -1290,10 +1300,8 @@ impl<'a, C, A> DocumentAnalyzeSyntaxCall<'a, C, A> where C: BorrowMut<hyper::Cli
///
/// # Additional Parameters
///
/// * *bearer_token* (query-string) - OAuth bearer token.
/// * *pp* (query-boolean) - Pretty-print response.
/// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks.
/// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart").
/// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks.
/// * *access_token* (query-string) - OAuth access token.
/// * *fields* (query-string) - Selector specifying which fields to include in a partial response.
/// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
@@ -1398,7 +1406,7 @@ impl<'a, C, A> DocumentAnalyzeSentimentCall<'a, C, A> where C: BorrowMut<hyper::
};
dlg.begin(MethodInfo { id: "language.documents.analyzeSentiment",
http_method: hyper::method::Method::Post });
let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len()));
let mut params: Vec<(&str, String)> = Vec::with_capacity(3 + self._additional_params.len());
for &field in ["alt"].iter() {
if self._additional_params.contains_key(field) {
dlg.finished(false);
@@ -1537,10 +1545,8 @@ impl<'a, C, A> DocumentAnalyzeSentimentCall<'a, C, A> where C: BorrowMut<hyper::
///
/// # Additional Parameters
///
/// * *bearer_token* (query-string) - OAuth bearer token.
/// * *pp* (query-boolean) - Pretty-print response.
/// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks.
/// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart").
/// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks.
/// * *access_token* (query-string) - OAuth access token.
/// * *fields* (query-string) - Selector specifying which fields to include in a partial response.
/// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
@@ -1645,7 +1651,7 @@ impl<'a, C, A> DocumentClassifyTextCall<'a, C, A> where C: BorrowMut<hyper::Clie
};
dlg.begin(MethodInfo { id: "language.documents.classifyText",
http_method: hyper::method::Method::Post });
let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len()));
let mut params: Vec<(&str, String)> = Vec::with_capacity(3 + self._additional_params.len());
for &field in ["alt"].iter() {
if self._additional_params.contains_key(field) {
dlg.finished(false);
@@ -1784,10 +1790,8 @@ impl<'a, C, A> DocumentClassifyTextCall<'a, C, A> where C: BorrowMut<hyper::Clie
///
/// # Additional Parameters
///
/// * *bearer_token* (query-string) - OAuth bearer token.
/// * *pp* (query-boolean) - Pretty-print response.
/// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks.
/// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart").
/// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks.
/// * *access_token* (query-string) - OAuth access token.
/// * *fields* (query-string) - Selector specifying which fields to include in a partial response.
/// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
@@ -1893,7 +1897,7 @@ impl<'a, C, A> DocumentAnalyzeEntitySentimentCall<'a, C, A> where C: BorrowMut<h
};
dlg.begin(MethodInfo { id: "language.documents.analyzeEntitySentiment",
http_method: hyper::method::Method::Post });
let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len()));
let mut params: Vec<(&str, String)> = Vec::with_capacity(3 + self._additional_params.len());
for &field in ["alt"].iter() {
if self._additional_params.contains_key(field) {
dlg.finished(false);
@@ -2032,10 +2036,8 @@ impl<'a, C, A> DocumentAnalyzeEntitySentimentCall<'a, C, A> where C: BorrowMut<h
///
/// # Additional Parameters
///
/// * *bearer_token* (query-string) - OAuth bearer token.
/// * *pp* (query-boolean) - Pretty-print response.
/// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks.
/// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart").
/// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks.
/// * *access_token* (query-string) - OAuth access token.
/// * *fields* (query-string) - Selector specifying which fields to include in a partial response.
/// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
@@ -2142,7 +2144,7 @@ impl<'a, C, A> DocumentAnalyzeEntityCall<'a, C, A> where C: BorrowMut<hyper::Cli
};
dlg.begin(MethodInfo { id: "language.documents.analyzeEntities",
http_method: hyper::method::Method::Post });
let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len()));
let mut params: Vec<(&str, String)> = Vec::with_capacity(3 + self._additional_params.len());
for &field in ["alt"].iter() {
if self._additional_params.contains_key(field) {
dlg.finished(false);
@@ -2281,10 +2283,8 @@ impl<'a, C, A> DocumentAnalyzeEntityCall<'a, C, A> where C: BorrowMut<hyper::Cli
///
/// # Additional Parameters
///
/// * *bearer_token* (query-string) - OAuth bearer token.
/// * *pp* (query-boolean) - Pretty-print response.
/// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks.
/// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart").
/// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks.
/// * *access_token* (query-string) - OAuth access token.
/// * *fields* (query-string) - Selector specifying which fields to include in a partial response.
/// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
@@ -2390,7 +2390,7 @@ impl<'a, C, A> DocumentAnnotateTextCall<'a, C, A> where C: BorrowMut<hyper::Clie
};
dlg.begin(MethodInfo { id: "language.documents.annotateText",
http_method: hyper::method::Method::Post });
let mut params: Vec<(&str, String)> = Vec::with_capacity((3 + self._additional_params.len()));
let mut params: Vec<(&str, String)> = Vec::with_capacity(3 + self._additional_params.len());
for &field in ["alt"].iter() {
if self._additional_params.contains_key(field) {
dlg.finished(false);
@@ -2529,10 +2529,8 @@ impl<'a, C, A> DocumentAnnotateTextCall<'a, C, A> where C: BorrowMut<hyper::Clie
///
/// # Additional Parameters
///
/// * *bearer_token* (query-string) - OAuth bearer token.
/// * *pp* (query-boolean) - Pretty-print response.
/// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks.
/// * *upload_protocol* (query-string) - Upload protocol for media (e.g. "raw", "multipart").
/// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks.
/// * *access_token* (query-string) - OAuth access token.
/// * *fields* (query-string) - Selector specifying which fields to include in a partial response.
/// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.