Bump google.golang.org/api

This commit is contained in:
Andrea Spacca
2019-03-17 20:19:56 +01:00
parent 8e39b7fa01
commit ec086b4eb3
5432 changed files with 2486664 additions and 231553 deletions

View File

@@ -59,11 +59,6 @@
"location": "query",
"type": "string"
},
"bearer_token": {
"description": "OAuth bearer token.",
"location": "query",
"type": "string"
},
"callback": {
"description": "JSONP",
"location": "query",
@@ -84,12 +79,6 @@
"location": "query",
"type": "string"
},
"pp": {
"default": "true",
"description": "Pretty-print response.",
"location": "query",
"type": "boolean"
},
"prettyPrint": {
"default": "true",
"description": "Returns response with indentations and line breaks.",
@@ -215,7 +204,7 @@
]
},
"report": {
"description": "Report an individual error event.\n\nThis endpoint accepts \u003cstrong\u003eeither\u003c/strong\u003e an OAuth token,\n\u003cstrong\u003eor\u003c/strong\u003e an\n\u003ca href=\"https://support.google.com/cloud/answer/6158862\"\u003eAPI key\u003c/a\u003e\nfor authentication. To use an API key, append it to the URL as the value of\na `key` parameter. For example:\n\u003cpre\u003ePOST https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456\u003c/pre\u003e",
"description": "Report an individual error event.\n\nThis endpoint accepts **either** an OAuth token,\n**or** an [API key](https://support.google.com/cloud/answer/6158862)\nfor authentication. To use an API key, append it to the URL as the value of\na `key` parameter. For example:\n\n`POST https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456`",
"flatPath": "v1beta1/projects/{projectsId}/events:report",
"httpMethod": "POST",
"id": "clouderrorreporting.projects.events.report",
@@ -412,7 +401,7 @@
}
}
},
"revision": "20180126",
"revision": "20180706",
"rootUrl": "https://clouderrorreporting.googleapis.com/",
"schemas": {
"DeleteEventsResponse": {

View File

@@ -1,28 +1,58 @@
// Copyright 2019 Google LLC.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Code generated file. DO NOT EDIT.
// Package clouderrorreporting provides access to the Stackdriver Error Reporting API.
//
// See https://cloud.google.com/error-reporting/
// For product documentation, see: https://cloud.google.com/error-reporting/
//
// Creating a client
//
// Usage example:
//
// import "google.golang.org/api/clouderrorreporting/v1beta1"
// ...
// clouderrorreportingService, err := clouderrorreporting.New(oauthHttpClient)
// ctx := context.Background()
// clouderrorreportingService, err := clouderrorreporting.NewService(ctx)
//
// In this example, Google Application Default Credentials are used for authentication.
//
// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
//
// Other authentication options
//
// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
//
// clouderrorreportingService, err := clouderrorreporting.NewService(ctx, option.WithAPIKey("AIza..."))
//
// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
//
// config := &oauth2.Config{...}
// // ...
// token, err := config.Exchange(ctx, ...)
// clouderrorreportingService, err := clouderrorreporting.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
//
// See https://godoc.org/google.golang.org/api/option/ for details on options.
package clouderrorreporting // import "google.golang.org/api/clouderrorreporting/v1beta1"
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
context "golang.org/x/net/context"
ctxhttp "golang.org/x/net/context/ctxhttp"
gensupport "google.golang.org/api/gensupport"
googleapi "google.golang.org/api/googleapi"
"io"
"net/http"
"net/url"
"strconv"
"strings"
gensupport "google.golang.org/api/gensupport"
googleapi "google.golang.org/api/googleapi"
option "google.golang.org/api/option"
htransport "google.golang.org/api/transport/http"
)
// Always reference these packages, just in case the auto-generated code
@@ -38,7 +68,6 @@ var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = context.Canceled
var _ = ctxhttp.Do
const apiId = "clouderrorreporting:v1beta1"
const apiName = "clouderrorreporting"
@@ -51,6 +80,32 @@ const (
CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
)
// NewService creates a new Service.
func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
scopesOption := option.WithScopes(
"https://www.googleapis.com/auth/cloud-platform",
)
// NOTE: prepend, so we don't override user-specified scopes.
opts = append([]option.ClientOption{scopesOption}, opts...)
client, endpoint, err := htransport.NewClient(ctx, opts...)
if err != nil {
return nil, err
}
s, err := New(client)
if err != nil {
return nil, err
}
if endpoint != "" {
s.BasePath = endpoint
}
return s, nil
}
// New creates a new Service. It uses the provided http.Client for requests.
//
// Deprecated: please use NewService instead.
// To provide a custom HTTP client, use option.WithHTTPClient.
// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
@@ -860,9 +915,13 @@ func (c *ProjectsDeleteEventsCall) doRequest(alt string) (*http.Response, error)
reqHeaders.Set("User-Agent", c.s.userAgent())
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+projectName}/events")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("DELETE", urls, body)
req, err := http.NewRequest("DELETE", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"projectName": c.projectName,
@@ -1065,9 +1124,13 @@ func (c *ProjectsEventsListCall) doRequest(alt string) (*http.Response, error) {
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+projectName}/events")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
req, err := http.NewRequest("GET", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"projectName": c.projectName,
@@ -1218,16 +1281,15 @@ type ProjectsEventsReportCall struct {
// Report: Report an individual error event.
//
// This endpoint accepts <strong>either</strong> an OAuth
// token,
// <strong>or</strong> an
// <a href="https://support.google.com/cloud/answer/6158862">API
// key</a>
// This endpoint accepts **either** an OAuth token,
// **or** an [API
// key](https://support.google.com/cloud/answer/6158862)
// for authentication. To use an API key, append it to the URL as the
// value of
// a `key` parameter. For example:
// <pre>POST
// https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456</pre>
//
// `POST
// https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456`
func (r *ProjectsEventsService) Report(projectName string, reportederrorevent *ReportedErrorEvent) *ProjectsEventsReportCall {
c := &ProjectsEventsReportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.projectName = projectName
@@ -1273,9 +1335,13 @@ func (c *ProjectsEventsReportCall) doRequest(alt string) (*http.Response, error)
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+projectName}/events:report")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
req, err := http.NewRequest("POST", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"projectName": c.projectName,
@@ -1321,7 +1387,7 @@ func (c *ProjectsEventsReportCall) Do(opts ...googleapi.CallOption) (*ReportErro
}
return ret, nil
// {
// "description": "Report an individual error event.\n\nThis endpoint accepts \u003cstrong\u003eeither\u003c/strong\u003e an OAuth token,\n\u003cstrong\u003eor\u003c/strong\u003e an\n\u003ca href=\"https://support.google.com/cloud/answer/6158862\"\u003eAPI key\u003c/a\u003e\nfor authentication. To use an API key, append it to the URL as the value of\na `key` parameter. For example:\n\u003cpre\u003ePOST https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456\u003c/pre\u003e",
// "description": "Report an individual error event.\n\nThis endpoint accepts **either** an OAuth token,\n**or** an [API key](https://support.google.com/cloud/answer/6158862)\nfor authentication. To use an API key, append it to the URL as the value of\na `key` parameter. For example:\n\n`POST https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456`",
// "flatPath": "v1beta1/projects/{projectsId}/events:report",
// "httpMethod": "POST",
// "id": "clouderrorreporting.projects.events.report",
@@ -1530,9 +1596,13 @@ func (c *ProjectsGroupStatsListCall) doRequest(alt string) (*http.Response, erro
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+projectName}/groupStats")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
req, err := http.NewRequest("GET", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"projectName": c.projectName,
@@ -1769,9 +1839,13 @@ func (c *ProjectsGroupsGetCall) doRequest(alt string) (*http.Response, error) {
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+groupName}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
req, err := http.NewRequest("GET", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"groupName": c.groupName,
@@ -1902,9 +1976,13 @@ func (c *ProjectsGroupsUpdateCall) doRequest(alt string) (*http.Response, error)
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
c.urlParams_.Set("prettyPrint", "false")
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("PUT", urls, body)
req, err := http.NewRequest("PUT", urls, body)
if err != nil {
return nil, err
}
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"name": c.name,