vendor: update all dependencies to latest versions

This commit is contained in:
Nick Craig-Wood
2017-09-30 15:27:27 +01:00
parent 911d121bb9
commit b017fcfe9a
3048 changed files with 537057 additions and 189681 deletions

View File

@ -47,6 +47,10 @@ const basePath = "https://language.googleapis.com/"
// OAuth2 scopes used by this API.
const (
// Apply machine learning models to reveal the structure and meaning of
// text
CloudLanguageScope = "https://www.googleapis.com/auth/cloud-language"
// View and manage your data across Google Cloud Platform services
CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
)
@ -515,6 +519,9 @@ func (s *AnnotateTextRequest) MarshalJSON() ([]byte, error) {
// AnnotateTextResponse: The text annotations response message.
type AnnotateTextResponse struct {
// Categories: Categories identified in the input document.
Categories []*ClassificationCategory `json:"categories,omitempty"`
// DocumentSentiment: The overall sentiment for the document. Populated
// if the user
// enables
@ -551,21 +558,20 @@ type AnnotateTextResponse struct {
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "DocumentSentiment")
// to unconditionally include in API requests. By default, fields with
// ForceSendFields is a list of field names (e.g. "Categories") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DocumentSentiment") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
// NullFields is a list of field names (e.g. "Categories") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
@ -575,6 +581,114 @@ func (s *AnnotateTextResponse) MarshalJSON() ([]byte, error) {
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ClassificationCategory: Represents a category returned from the text
// classifier.
type ClassificationCategory struct {
// Confidence: The classifier's confidence of the category. Number
// represents how certain
// the classifier is that this category represents the given text.
Confidence float64 `json:"confidence,omitempty"`
// Name: The name of the category representing the document.
Name string `json:"name,omitempty"`
// ForceSendFields is a list of field names (e.g. "Confidence") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Confidence") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ClassificationCategory) MarshalJSON() ([]byte, error) {
type noMethod ClassificationCategory
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *ClassificationCategory) UnmarshalJSON(data []byte) error {
type noMethod ClassificationCategory
var s1 struct {
Confidence gensupport.JSONFloat64 `json:"confidence"`
*noMethod
}
s1.noMethod = (*noMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.Confidence = float64(s1.Confidence)
return nil
}
// ClassifyTextRequest: The document classification request message.
type ClassifyTextRequest struct {
// Document: Input document.
Document *Document `json:"document,omitempty"`
// ForceSendFields is a list of field names (e.g. "Document") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Document") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ClassifyTextRequest) MarshalJSON() ([]byte, error) {
type noMethod ClassifyTextRequest
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ClassifyTextResponse: The document classification response message.
type ClassifyTextResponse struct {
// Categories: Categories representing the input document.
Categories []*ClassificationCategory `json:"categories,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Categories") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Categories") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ClassifyTextResponse) MarshalJSON() ([]byte, error) {
type noMethod ClassifyTextResponse
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// DependencyEdge: Represents dependency parse tree information for a
// token.
type DependencyEdge struct {
@ -671,6 +785,12 @@ type DependencyEdge struct {
// "COP" - Copula
// "DISLOCATED" - Dislocated relation (for fronted/topicalized
// elements)
// "ASP" - Aspect marker
// "GMOD" - Genitive modifier
// "GOBJ" - Genitive object
// "INFMOD" - Infinitival modifier
// "MES" - Measure
// "NCOMP" - Nominal complement of a noun
Label string `json:"label,omitempty"`
// ForceSendFields is a list of field names (e.g. "HeadTokenIndex") to
@ -905,6 +1025,9 @@ func (s *EntityMention) MarshalJSON() ([]byte, error) {
// Setting each one to true will enable that specific analysis for the
// input.
type Features struct {
// ClassifyText: Classify the full document into categories.
ClassifyText bool `json:"classifyText,omitempty"`
// ExtractDocumentSentiment: Extract document-level sentiment.
ExtractDocumentSentiment bool `json:"extractDocumentSentiment,omitempty"`
@ -918,22 +1041,20 @@ type Features struct {
// ExtractSyntax: Extract syntax information.
ExtractSyntax bool `json:"extractSyntax,omitempty"`
// ForceSendFields is a list of field names (e.g.
// "ExtractDocumentSentiment") to unconditionally include in API
// requests. By default, fields with empty values are omitted from API
// requests. However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
// ForceSendFields is a list of field names (e.g. "ClassifyText") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ExtractDocumentSentiment")
// to include in API requests with the JSON null value. By default,
// fields with empty values are omitted from API requests. However, any
// field with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
// NullFields is a list of field names (e.g. "ClassifyText") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
@ -1296,9 +1417,9 @@ type Status struct {
// google.rpc.Code.
Code int64 `json:"code,omitempty"`
// Details: A list of messages that carry the error details. There will
// be a
// common set of message types for APIs to use.
// Details: A list of messages that carry the error details. There is a
// common set of
// message types for APIs to use.
Details []googleapi.RawMessage `json:"details,omitempty"`
// Message: A developer-facing error message, which should be in
@ -1521,6 +1642,7 @@ func (c *DocumentsAnalyzeEntitiesCall) Do(opts ...googleapi.CallOption) (*Analyz
// "$ref": "AnalyzeEntitiesResponse"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-language",
// "https://www.googleapis.com/auth/cloud-platform"
// ]
// }
@ -1643,6 +1765,7 @@ func (c *DocumentsAnalyzeEntitySentimentCall) Do(opts ...googleapi.CallOption) (
// "$ref": "AnalyzeEntitySentimentResponse"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-language",
// "https://www.googleapis.com/auth/cloud-platform"
// ]
// }
@ -1763,6 +1886,7 @@ func (c *DocumentsAnalyzeSentimentCall) Do(opts ...googleapi.CallOption) (*Analy
// "$ref": "AnalyzeSentimentResponse"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-language",
// "https://www.googleapis.com/auth/cloud-platform"
// ]
// }
@ -1887,6 +2011,7 @@ func (c *DocumentsAnalyzeSyntaxCall) Do(opts ...googleapi.CallOption) (*AnalyzeS
// "$ref": "AnalyzeSyntaxResponse"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-language",
// "https://www.googleapis.com/auth/cloud-platform"
// ]
// }
@ -2009,6 +2134,128 @@ func (c *DocumentsAnnotateTextCall) Do(opts ...googleapi.CallOption) (*AnnotateT
// "$ref": "AnnotateTextResponse"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-language",
// "https://www.googleapis.com/auth/cloud-platform"
// ]
// }
}
// method id "language.documents.classifyText":
type DocumentsClassifyTextCall struct {
s *Service
classifytextrequest *ClassifyTextRequest
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// ClassifyText: Classifies a document into categories.
func (r *DocumentsService) ClassifyText(classifytextrequest *ClassifyTextRequest) *DocumentsClassifyTextCall {
c := &DocumentsClassifyTextCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.classifytextrequest = classifytextrequest
return c
}
// Fields allows partial responses to be retrieved. See
// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
// for more information.
func (c *DocumentsClassifyTextCall) Fields(s ...googleapi.Field) *DocumentsClassifyTextCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// Context sets the context to be used in this call's Do method. Any
// pending HTTP request will be aborted if the provided context is
// canceled.
func (c *DocumentsClassifyTextCall) Context(ctx context.Context) *DocumentsClassifyTextCall {
c.ctx_ = ctx
return c
}
// Header returns an http.Header that can be modified by the caller to
// add HTTP headers to the request.
func (c *DocumentsClassifyTextCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *DocumentsClassifyTextCall) doRequest(alt string) (*http.Response, error) {
reqHeaders := make(http.Header)
for k, v := range c.header_ {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.classifytextrequest)
if err != nil {
return nil, err
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/documents:classifyText")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
req.Header = reqHeaders
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "language.documents.classifyText" call.
// Exactly one of *ClassifyTextResponse or error will be non-nil. Any
// non-2xx status code is an error. Response headers are in either
// *ClassifyTextResponse.ServerResponse.Header or (if a response was
// returned at all) in error.(*googleapi.Error).Header. Use
// googleapi.IsNotModified to check whether the returned error was
// because http.StatusNotModified was returned.
func (c *DocumentsClassifyTextCall) Do(opts ...googleapi.CallOption) (*ClassifyTextResponse, error) {
gensupport.SetOptions(c.urlParams_, opts...)
res, err := c.doRequest("json")
if res != nil && res.StatusCode == http.StatusNotModified {
if res.Body != nil {
res.Body.Close()
}
return nil, &googleapi.Error{
Code: res.StatusCode,
Header: res.Header,
}
}
if err != nil {
return nil, err
}
defer googleapi.CloseBody(res)
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
ret := &ClassifyTextResponse{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Classifies a document into categories.",
// "flatPath": "v1beta2/documents:classifyText",
// "httpMethod": "POST",
// "id": "language.documents.classifyText",
// "parameterOrder": [],
// "parameters": {},
// "path": "v1beta2/documents:classifyText",
// "request": {
// "$ref": "ClassifyTextRequest"
// },
// "response": {
// "$ref": "ClassifyTextResponse"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-language",
// "https://www.googleapis.com/auth/cloud-platform"
// ]
// }