vendoring latest version of google-api-go-client

This commit is contained in:
Cheng Xing 2018-02-24 17:15:28 -08:00
parent 62c5f21d5d
commit accf8c4b9a
21 changed files with 116035 additions and 112204 deletions

22
Godeps/Godeps.json generated
View File

@ -3014,47 +3014,47 @@
},
{
"ImportPath": "google.golang.org/api/cloudmonitoring/v2beta2",
"Rev": "c0dae069ee96c9261a04c81efd9e0f1e55f565ac"
"Rev": "ab90adb3efa287b869ecb698db42f923cc734972"
},
{
"ImportPath": "google.golang.org/api/compute/v0.alpha",
"Rev": "c0dae069ee96c9261a04c81efd9e0f1e55f565ac"
"Rev": "ab90adb3efa287b869ecb698db42f923cc734972"
},
{
"ImportPath": "google.golang.org/api/compute/v0.beta",
"Rev": "c0dae069ee96c9261a04c81efd9e0f1e55f565ac"
"Rev": "ab90adb3efa287b869ecb698db42f923cc734972"
},
{
"ImportPath": "google.golang.org/api/compute/v1",
"Rev": "c0dae069ee96c9261a04c81efd9e0f1e55f565ac"
"Rev": "ab90adb3efa287b869ecb698db42f923cc734972"
},
{
"ImportPath": "google.golang.org/api/container/v1",
"Rev": "c0dae069ee96c9261a04c81efd9e0f1e55f565ac"
"Rev": "ab90adb3efa287b869ecb698db42f923cc734972"
},
{
"ImportPath": "google.golang.org/api/gensupport",
"Rev": "c0dae069ee96c9261a04c81efd9e0f1e55f565ac"
"Rev": "ab90adb3efa287b869ecb698db42f923cc734972"
},
{
"ImportPath": "google.golang.org/api/googleapi",
"Rev": "c0dae069ee96c9261a04c81efd9e0f1e55f565ac"
"Rev": "ab90adb3efa287b869ecb698db42f923cc734972"
},
{
"ImportPath": "google.golang.org/api/googleapi/internal/uritemplates",
"Rev": "c0dae069ee96c9261a04c81efd9e0f1e55f565ac"
"Rev": "ab90adb3efa287b869ecb698db42f923cc734972"
},
{
"ImportPath": "google.golang.org/api/logging/v2beta1",
"Rev": "c0dae069ee96c9261a04c81efd9e0f1e55f565ac"
"Rev": "ab90adb3efa287b869ecb698db42f923cc734972"
},
{
"ImportPath": "google.golang.org/api/monitoring/v3",
"Rev": "c0dae069ee96c9261a04c81efd9e0f1e55f565ac"
"Rev": "ab90adb3efa287b869ecb698db42f923cc734972"
},
{
"ImportPath": "google.golang.org/api/pubsub/v1",
"Rev": "c0dae069ee96c9261a04c81efd9e0f1e55f565ac"
"Rev": "ab90adb3efa287b869ecb698db42f923cc734972"
},
{
"ImportPath": "google.golang.org/genproto/googleapis/api/annotations",

View File

@ -44,6 +44,7 @@ Ivan Krasin <krasin@golang.org>
Jason Hall <jasonhall@google.com>
Johan Euphrosine <proppy@google.com>
Kostik Shtoyk <kostik@google.com>
Kunpei Sakai <namusyaka@gmail.com>
Matthew Whisenhunt <matt.whisenhunt@gmail.com>
Michael McGreevy <mcgreevy@golang.org>
Nick Craig-Wood <nickcw@gmail.com>

View File

@ -141,8 +141,8 @@ type DeleteMetricDescriptorResponse struct {
}
func (s *DeleteMetricDescriptorResponse) MarshalJSON() ([]byte, error) {
type noMethod DeleteMetricDescriptorResponse
raw := noMethod(*s)
type NoMethod DeleteMetricDescriptorResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@ -171,8 +171,8 @@ type ListMetricDescriptorsRequest struct {
}
func (s *ListMetricDescriptorsRequest) MarshalJSON() ([]byte, error) {
type noMethod ListMetricDescriptorsRequest
raw := noMethod(*s)
type NoMethod ListMetricDescriptorsRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@ -214,8 +214,8 @@ type ListMetricDescriptorsResponse struct {
}
func (s *ListMetricDescriptorsResponse) MarshalJSON() ([]byte, error) {
type noMethod ListMetricDescriptorsResponse
raw := noMethod(*s)
type NoMethod ListMetricDescriptorsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@ -244,8 +244,8 @@ type ListTimeseriesDescriptorsRequest struct {
}
func (s *ListTimeseriesDescriptorsRequest) MarshalJSON() ([]byte, error) {
type noMethod ListTimeseriesDescriptorsRequest
raw := noMethod(*s)
type NoMethod ListTimeseriesDescriptorsRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@ -295,8 +295,8 @@ type ListTimeseriesDescriptorsResponse struct {
}
func (s *ListTimeseriesDescriptorsResponse) MarshalJSON() ([]byte, error) {
type noMethod ListTimeseriesDescriptorsResponse
raw := noMethod(*s)
type NoMethod ListTimeseriesDescriptorsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@ -324,8 +324,8 @@ type ListTimeseriesRequest struct {
}
func (s *ListTimeseriesRequest) MarshalJSON() ([]byte, error) {
type noMethod ListTimeseriesRequest
raw := noMethod(*s)
type NoMethod ListTimeseriesRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@ -376,8 +376,8 @@ type ListTimeseriesResponse struct {
}
func (s *ListTimeseriesResponse) MarshalJSON() ([]byte, error) {
type noMethod ListTimeseriesResponse
raw := noMethod(*s)
type NoMethod ListTimeseriesResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@ -421,8 +421,8 @@ type MetricDescriptor struct {
}
func (s *MetricDescriptor) MarshalJSON() ([]byte, error) {
type noMethod MetricDescriptor
raw := noMethod(*s)
type NoMethod MetricDescriptor
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@ -454,8 +454,8 @@ type MetricDescriptorLabelDescriptor struct {
}
func (s *MetricDescriptorLabelDescriptor) MarshalJSON() ([]byte, error) {
type noMethod MetricDescriptorLabelDescriptor
raw := noMethod(*s)
type NoMethod MetricDescriptorLabelDescriptor
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@ -489,8 +489,8 @@ type MetricDescriptorTypeDescriptor struct {
}
func (s *MetricDescriptorTypeDescriptor) MarshalJSON() ([]byte, error) {
type noMethod MetricDescriptorTypeDescriptor
raw := noMethod(*s)
type NoMethod MetricDescriptorTypeDescriptor
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@ -550,18 +550,18 @@ type Point struct {
}
func (s *Point) MarshalJSON() ([]byte, error) {
type noMethod Point
raw := noMethod(*s)
type NoMethod Point
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *Point) UnmarshalJSON(data []byte) error {
type noMethod Point
type NoMethod Point
var s1 struct {
DoubleValue *gensupport.JSONFloat64 `json:"doubleValue"`
*noMethod
*NoMethod
}
s1.noMethod = (*noMethod)(s)
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
@ -603,8 +603,8 @@ type PointDistribution struct {
}
func (s *PointDistribution) MarshalJSON() ([]byte, error) {
type noMethod PointDistribution
raw := noMethod(*s)
type NoMethod PointDistribution
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@ -643,19 +643,19 @@ type PointDistributionBucket struct {
}
func (s *PointDistributionBucket) MarshalJSON() ([]byte, error) {
type noMethod PointDistributionBucket
raw := noMethod(*s)
type NoMethod PointDistributionBucket
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *PointDistributionBucket) UnmarshalJSON(data []byte) error {
type noMethod PointDistributionBucket
type NoMethod PointDistributionBucket
var s1 struct {
LowerBound gensupport.JSONFloat64 `json:"lowerBound"`
UpperBound gensupport.JSONFloat64 `json:"upperBound"`
*noMethod
*NoMethod
}
s1.noMethod = (*noMethod)(s)
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
@ -694,18 +694,18 @@ type PointDistributionOverflowBucket struct {
}
func (s *PointDistributionOverflowBucket) MarshalJSON() ([]byte, error) {
type noMethod PointDistributionOverflowBucket
raw := noMethod(*s)
type NoMethod PointDistributionOverflowBucket
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *PointDistributionOverflowBucket) UnmarshalJSON(data []byte) error {
type noMethod PointDistributionOverflowBucket
type NoMethod PointDistributionOverflowBucket
var s1 struct {
LowerBound gensupport.JSONFloat64 `json:"lowerBound"`
*noMethod
*NoMethod
}
s1.noMethod = (*noMethod)(s)
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
@ -743,18 +743,18 @@ type PointDistributionUnderflowBucket struct {
}
func (s *PointDistributionUnderflowBucket) MarshalJSON() ([]byte, error) {
type noMethod PointDistributionUnderflowBucket
raw := noMethod(*s)
type NoMethod PointDistributionUnderflowBucket
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *PointDistributionUnderflowBucket) UnmarshalJSON(data []byte) error {
type noMethod PointDistributionUnderflowBucket
type NoMethod PointDistributionUnderflowBucket
var s1 struct {
UpperBound gensupport.JSONFloat64 `json:"upperBound"`
*noMethod
*NoMethod
}
s1.noMethod = (*noMethod)(s)
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
@ -792,8 +792,8 @@ type Timeseries struct {
}
func (s *Timeseries) MarshalJSON() ([]byte, error) {
type noMethod Timeseries
raw := noMethod(*s)
type NoMethod Timeseries
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@ -828,8 +828,8 @@ type TimeseriesDescriptor struct {
}
func (s *TimeseriesDescriptor) MarshalJSON() ([]byte, error) {
type noMethod TimeseriesDescriptor
raw := noMethod(*s)
type NoMethod TimeseriesDescriptor
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@ -858,8 +858,8 @@ type TimeseriesDescriptorLabel struct {
}
func (s *TimeseriesDescriptorLabel) MarshalJSON() ([]byte, error) {
type noMethod TimeseriesDescriptorLabel
raw := noMethod(*s)
type NoMethod TimeseriesDescriptorLabel
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@ -891,8 +891,8 @@ type TimeseriesPoint struct {
}
func (s *TimeseriesPoint) MarshalJSON() ([]byte, error) {
type noMethod TimeseriesPoint
raw := noMethod(*s)
type NoMethod TimeseriesPoint
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@ -925,8 +925,8 @@ type WriteTimeseriesRequest struct {
}
func (s *WriteTimeseriesRequest) MarshalJSON() ([]byte, error) {
type noMethod WriteTimeseriesRequest
raw := noMethod(*s)
type NoMethod WriteTimeseriesRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@ -959,8 +959,8 @@ type WriteTimeseriesResponse struct {
}
func (s *WriteTimeseriesResponse) MarshalJSON() ([]byte, error) {
type noMethod WriteTimeseriesResponse
raw := noMethod(*s)
type NoMethod WriteTimeseriesResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@ -1064,7 +1064,7 @@ func (c *MetricDescriptorsCreateCall) Do(opts ...googleapi.CallOption) (*MetricD
},
}
target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil {
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@ -1194,7 +1194,7 @@ func (c *MetricDescriptorsDeleteCall) Do(opts ...googleapi.CallOption) (*DeleteM
},
}
target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil {
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@ -1373,7 +1373,7 @@ func (c *MetricDescriptorsListCall) Do(opts ...googleapi.CallOption) (*ListMetri
},
}
target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil {
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@ -1651,7 +1651,7 @@ func (c *TimeseriesListCall) Do(opts ...googleapi.CallOption) (*ListTimeseriesRe
},
}
target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil {
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@ -1882,7 +1882,7 @@ func (c *TimeseriesWriteCall) Do(opts ...googleapi.CallOption) (*WriteTimeseries
},
}
target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil {
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
@ -2122,7 +2122,7 @@ func (c *TimeseriesDescriptorsListCall) Do(opts ...googleapi.CallOption) (*ListT
},
}
target := &ret
if err := json.NewDecoder(res.Body).Decode(target); err != nil {
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
// Package container provides access to the Google Container Engine API.
// Package container provides access to the Google Kubernetes Engine API.
//
// See https://cloud.google.com/container-engine/
//
@ -1522,10 +1522,16 @@ type NodeConfig struct {
// server.
// Additionally, to avoid ambiguity, keys must not conflict with any
// other
// metadata keys for the project or be one of the four reserved
// keys:
// "instance-template", "kube-env", "startup-script", and
// "user-data"
// metadata keys for the project or be one of the reserved keys:
// "cluster-name"
// "cluster-uid"
// "configure-sh"
// "gci-update-strategy"
// "gci-ensure-gke-docker"
// "instance-template"
// "kube-env"
// "startup-script"
// "user-data"
//
// Values are free-form strings, and only have meaning as interpreted
// by

View File

@ -6,10 +6,12 @@ go_library(
"backoff.go",
"buffer.go",
"doc.go",
"go18.go",
"header.go",
"json.go",
"jsonfloat.go",
"media.go",
"not_go18.go",
"params.go",
"resumable.go",
"retry.go",

17
vendor/google.golang.org/api/gensupport/go18.go generated vendored Normal file
View File

@ -0,0 +1,17 @@
// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build go1.8
package gensupport
import (
"io"
"net/http"
)
// SetGetBody sets the GetBody field of req to f.
func SetGetBody(req *http.Request, f func() (io.ReadCloser, error)) {
req.GetBody = f
}

View File

@ -5,12 +5,14 @@
package gensupport
import (
"bytes"
"fmt"
"io"
"io/ioutil"
"mime/multipart"
"net/http"
"net/textproto"
"strings"
"google.golang.org/api/googleapi"
)
@ -251,11 +253,11 @@ func (mi *MediaInfo) UploadType() string {
}
// UploadRequest sets up an HTTP request for media upload. It adds headers
// as necessary, and returns a replacement for the body.
func (mi *MediaInfo) UploadRequest(reqHeaders http.Header, body io.Reader) (newBody io.Reader, cleanup func()) {
// as necessary, and returns a replacement for the body and a function for http.Request.GetBody.
func (mi *MediaInfo) UploadRequest(reqHeaders http.Header, body io.Reader) (newBody io.Reader, getBody func() (io.ReadCloser, error), cleanup func()) {
cleanup = func() {}
if mi == nil {
return body, cleanup
return body, nil, cleanup
}
var media io.Reader
if mi.media != nil {
@ -269,7 +271,17 @@ func (mi *MediaInfo) UploadRequest(reqHeaders http.Header, body io.Reader) (newB
media, _, _, _ = mi.buffer.Chunk()
}
if media != nil {
fb := readerFunc(body)
fm := readerFunc(media)
combined, ctype := CombineBodyMedia(body, "application/json", media, mi.mType)
if fb != nil && fm != nil {
getBody = func() (io.ReadCloser, error) {
rb := ioutil.NopCloser(fb())
rm := ioutil.NopCloser(fm())
r, _ := CombineBodyMedia(rb, "application/json", rm, mi.mType)
return r, nil
}
}
cleanup = func() { combined.Close() }
reqHeaders.Set("Content-Type", ctype)
body = combined
@ -277,7 +289,27 @@ func (mi *MediaInfo) UploadRequest(reqHeaders http.Header, body io.Reader) (newB
if mi.buffer != nil && mi.mType != "" && !mi.singleChunk {
reqHeaders.Set("X-Upload-Content-Type", mi.mType)
}
return body, cleanup
return body, getBody, cleanup
}
// readerFunc returns a function that always returns an io.Reader that has the same
// contents as r, provided that can be done without consuming r. Otherwise, it
// returns nil.
// See http.NewRequest (in net/http/request.go).
func readerFunc(r io.Reader) func() io.Reader {
switch r := r.(type) {
case *bytes.Buffer:
buf := r.Bytes()
return func() io.Reader { return bytes.NewReader(buf) }
case *bytes.Reader:
snapshot := *r
return func() io.Reader { r := snapshot; return &r }
case *strings.Reader:
snapshot := *r
return func() io.Reader { r := snapshot; return &r }
default:
return nil
}
}
// ResumableUpload returns an appropriately configured ResumableUpload value if the

14
vendor/google.golang.org/api/gensupport/not_go18.go generated vendored Normal file
View File

@ -0,0 +1,14 @@
// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !go1.8
package gensupport
import (
"io"
"net/http"
)
func SetGetBody(req *http.Request, f func() (io.ReadCloser, error)) {}

File diff suppressed because it is too large Load Diff

View File

@ -1402,15 +1402,14 @@ type MetricDescriptor struct {
// Ki kibi (2**10)
// Mi mebi (2**20)
// Gi gibi (2**30)
// Ti tebi (2**40)GrammarThe grammar includes the dimensionless unit 1,
// such as 1/s.The grammar also includes these connectors:
// Ti tebi (2**40)GrammarThe grammar also includes these connectors:
// / division (as an infix operator, e.g. 1/s).
// . multiplication (as an infix operator, e.g. GBy.d)The grammar for a
// unit is as follows:
// Expression = Component { "." Component } { "/" Component }
// ;
//
// Component = [ PREFIX ] UNIT [ Annotation ]
// Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ]
// | Annotation
// | "1"
// ;
@ -1422,6 +1421,9 @@ type MetricDescriptor struct {
// By{transmitted}/s == By/s.
// NAME is a sequence of non-blank printable ASCII characters not
// containing '{' or '}'.
// 1 represents dimensionless value 1, such as in 1/s.
// % represents dimensionless value 1/100, and annotates values giving
// a percentage.
Unit string `json:"unit,omitempty"`
// ValueType: Whether the measurement is an integer, a floating-point
@ -1810,6 +1812,12 @@ func (s *SourceReference) MarshalJSON() ([]byte, error) {
// WriteLogEntriesRequest: The parameters to WriteLogEntries.
type WriteLogEntriesRequest struct {
// DryRun: Optional. If true, the request should expect normal response,
// but the entries won't be persisted nor exported. Useful for checking
// whether the logging API endpoints are working properly before sending
// valuable data.
DryRun bool `json:"dryRun,omitempty"`
// Entries: Required. The log entries to send to Stackdriver Logging.
// The order of log entries in this list does not matter. Values
// supplied in this method's log_name, resource, and labels fields are
@ -1869,7 +1877,7 @@ type WriteLogEntriesRequest struct {
// See LogEntry.
Resource *MonitoredResource `json:"resource,omitempty"`
// ForceSendFields is a list of field names (e.g. "Entries") to
// ForceSendFields is a list of field names (e.g. "DryRun") 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
@ -1877,8 +1885,8 @@ type WriteLogEntriesRequest struct {
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Entries") to include in
// API requests with the JSON null value. By default, fields with empty
// NullFields is a list of field names (e.g. "DryRun") 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.

File diff suppressed because it is too large Load Diff

View File

@ -955,7 +955,8 @@ type HttpCheck struct {
// comma-separated list of all the desired values as described at
// https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31). Entering
// two separate headers with the same key in a Create call will cause
// the first to be overwritten by the second.
// the first to be overwritten by the second. The maximum number of
// headers allowed is 100.
Headers map[string]string `json:"headers,omitempty"`
// MaskHeaders: Boolean specifiying whether to encrypt the header
@ -1344,6 +1345,10 @@ type ListUptimeCheckConfigsResponse struct {
// call (in the request message's page_token field).
NextPageToken string `json:"nextPageToken,omitempty"`
// TotalSize: The total number of uptime check configurations for the
// project, irrespective of any pagination.
TotalSize int64 `json:"totalSize,omitempty"`
// UptimeCheckConfigs: The returned uptime check configurations.
UptimeCheckConfigs []*UptimeCheckConfig `json:"uptimeCheckConfigs,omitempty"`
@ -1851,7 +1856,7 @@ type ResourceGroup struct {
// "RESOURCE_TYPE_UNSPECIFIED" - Default value (not valid).
// "INSTANCE" - A group of instances from Google Cloud Platform (GCP)
// or Amazon Web Services (AWS).
// "AWS_ELB_LOAD_BALANCER" - A group of AWS load balancers.
// "AWS_ELB_LOAD_BALANCER" - A group of Amazon ELB load balancers.
ResourceType string `json:"resourceType,omitempty"`
// ForceSendFields is a list of field names (e.g. "GroupId") to
@ -2085,9 +2090,9 @@ type TimeSeries struct {
MetricKind string `json:"metricKind,omitempty"`
// Points: The data points of this time series. When listing time
// series, the order of the points is specified by the list method.When
// creating a time series, this field must contain exactly one point and
// the point's type must be the same as the value type of the associated
// series, points are returned in reverse time order.When creating a
// time series, this field must contain exactly one point and the
// point's type must be the same as the value type of the associated
// metric. If the associated metric's descriptor must be auto-created,
// then the value type of the descriptor is determined by the point's
// type, which must be BOOL, INT64, DOUBLE, or DISTRIBUTION.
@ -2276,8 +2281,11 @@ type UptimeCheckConfig struct {
// InternalCheckers.
IsInternal bool `json:"isInternal,omitempty"`
// MonitoredResource: The monitored resource associated with the
// configuration.
// MonitoredResource: The monitored resource
// (https://cloud.google.com/monitoring/api/resources) associated with
// the configuration. The following monitored resource types are
// supported for uptime checks: uptime_url gce_instance gae_app
// aws_ec2_instance aws_elb_load_balancer
MonitoredResource *MonitoredResource `json:"monitoredResource,omitempty"`
// Name: A unique resource name for this UptimeCheckConfig. The format
@ -2287,8 +2295,9 @@ type UptimeCheckConfig struct {
// in the response.
Name string `json:"name,omitempty"`
// Period: How often the uptime check is performed. Currently, only 1,
// 5, 10, and 15 minutes are supported. Required.
// Period: How often, in seconds, the uptime check is performed.
// Currently, the only supported values are 60s (1 minute), 300s (5
// minutes), 600s (10 minutes), and 900s (15 minutes). Required.
Period string `json:"period,omitempty"`
// ResourceGroup: The group resource associated with the configuration.
@ -4734,6 +4743,7 @@ func (c *ProjectsTimeSeriesListCall) AggregationAlignmentPeriod(aggregationAlign
// "REDUCE_STDDEV"
// "REDUCE_COUNT"
// "REDUCE_COUNT_TRUE"
// "REDUCE_COUNT_FALSE"
// "REDUCE_FRACTION_TRUE"
// "REDUCE_PERCENTILE_99"
// "REDUCE_PERCENTILE_95"
@ -4787,11 +4797,13 @@ func (c *ProjectsTimeSeriesListCall) AggregationGroupByFields(aggregationGroupBy
// "ALIGN_SUM"
// "ALIGN_STDDEV"
// "ALIGN_COUNT_TRUE"
// "ALIGN_COUNT_FALSE"
// "ALIGN_FRACTION_TRUE"
// "ALIGN_PERCENTILE_99"
// "ALIGN_PERCENTILE_95"
// "ALIGN_PERCENTILE_50"
// "ALIGN_PERCENTILE_05"
// "ALIGN_PERCENT_CHANGE"
func (c *ProjectsTimeSeriesListCall) AggregationPerSeriesAligner(aggregationPerSeriesAligner string) *ProjectsTimeSeriesListCall {
c.urlParams_.Set("aggregation.perSeriesAligner", aggregationPerSeriesAligner)
return c
@ -4824,9 +4836,9 @@ func (c *ProjectsTimeSeriesListCall) IntervalStartTime(intervalStartTime string)
return c
}
// OrderBy sets the optional parameter "orderBy": Specifies the order in
// which the points of the time series should be returned. By default,
// results are not ordered. Currently, this field must be left blank.
// OrderBy sets the optional parameter "orderBy": Unsupported: must be
// left blank. The points in each time series are returned in reverse
// time order.
func (c *ProjectsTimeSeriesListCall) OrderBy(orderBy string) *ProjectsTimeSeriesListCall {
c.urlParams_.Set("orderBy", orderBy)
return c
@ -4981,6 +4993,7 @@ func (c *ProjectsTimeSeriesListCall) Do(opts ...googleapi.CallOption) (*ListTime
// "REDUCE_STDDEV",
// "REDUCE_COUNT",
// "REDUCE_COUNT_TRUE",
// "REDUCE_COUNT_FALSE",
// "REDUCE_FRACTION_TRUE",
// "REDUCE_PERCENTILE_99",
// "REDUCE_PERCENTILE_95",
@ -5011,11 +5024,13 @@ func (c *ProjectsTimeSeriesListCall) Do(opts ...googleapi.CallOption) (*ListTime
// "ALIGN_SUM",
// "ALIGN_STDDEV",
// "ALIGN_COUNT_TRUE",
// "ALIGN_COUNT_FALSE",
// "ALIGN_FRACTION_TRUE",
// "ALIGN_PERCENTILE_99",
// "ALIGN_PERCENTILE_95",
// "ALIGN_PERCENTILE_50",
// "ALIGN_PERCENTILE_05"
// "ALIGN_PERCENTILE_05",
// "ALIGN_PERCENT_CHANGE"
// ],
// "location": "query",
// "type": "string"
@ -5045,7 +5060,7 @@ func (c *ProjectsTimeSeriesListCall) Do(opts ...googleapi.CallOption) (*ListTime
// "type": "string"
// },
// "orderBy": {
// "description": "Specifies the order in which the points of the time series should be returned. By default, results are not ordered. Currently, this field must be left blank.",
// "description": "Unsupported: must be left blank. The points in each time series are returned in reverse time order.",
// "location": "query",
// "type": "string"
// },
@ -5218,7 +5233,7 @@ func (c *ProjectsUptimeCheckConfigsCreateCall) Do(opts ...googleapi.CallOption)
// ],
// "parameters": {
// "parent": {
// "description": "The project in which to create the uptime check. The format is:projects/[PROJECT_ID].",
// "description": "The project in which to create the uptime check. The format is projects/[PROJECT_ID].",
// "location": "path",
// "pattern": "^projects/[^/]+$",
// "required": true,
@ -5350,7 +5365,7 @@ func (c *ProjectsUptimeCheckConfigsDeleteCall) Do(opts ...googleapi.CallOption)
// ],
// "parameters": {
// "name": {
// "description": "The uptime check configuration to delete. The format isprojects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID].",
// "description": "The uptime check configuration to delete. The format is projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID].",
// "location": "path",
// "pattern": "^projects/[^/]+/uptimeCheckConfigs/[^/]+$",
// "required": true,
@ -5490,7 +5505,7 @@ func (c *ProjectsUptimeCheckConfigsGetCall) Do(opts ...googleapi.CallOption) (*U
// ],
// "parameters": {
// "name": {
// "description": "The uptime check configuration to retrieve. The format isprojects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID].",
// "description": "The uptime check configuration to retrieve. The format is projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID].",
// "location": "path",
// "pattern": "^projects/[^/]+/uptimeCheckConfigs/[^/]+$",
// "required": true,
@ -5662,7 +5677,7 @@ func (c *ProjectsUptimeCheckConfigsListCall) Do(opts ...googleapi.CallOption) (*
// "type": "string"
// },
// "parent": {
// "description": "The project whose uptime check configurations are listed. The format isprojects/[PROJECT_ID].",
// "description": "The project whose uptime check configurations are listed. The format is projects/[PROJECT_ID].",
// "location": "path",
// "pattern": "^projects/[^/]+$",
// "required": true,

File diff suppressed because it is too large Load Diff

View File

@ -603,7 +603,7 @@ func (s *ModifyPushConfigRequest) MarshalJSON() ([]byte, error) {
// }
//
// For a description of IAM and its features, see the
// [IAM developer's guide](https://cloud.google.com/iam).
// [IAM developer's guide](https://cloud.google.com/iam/docs).
type Policy struct {
// Bindings: Associates a list of `members` to a `role`.
// `bindings` with no members will result in an error.
@ -629,7 +629,7 @@ type Policy struct {
// policy is overwritten blindly.
Etag string `json:"etag,omitempty"`
// Version: Version of the `Policy`. The default version is 0.
// Version: Deprecated.
Version int64 `json:"version,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
@ -1676,6 +1676,146 @@ func (c *ProjectsSnapshotsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty,
}
// method id "pubsub.projects.snapshots.get":
type ProjectsSnapshotsGetCall struct {
s *Service
snapshot string
urlParams_ gensupport.URLParams
ifNoneMatch_ string
ctx_ context.Context
header_ http.Header
}
// Get: Gets the configuration details of a snapshot.
func (r *ProjectsSnapshotsService) Get(snapshot string) *ProjectsSnapshotsGetCall {
c := &ProjectsSnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.snapshot = snapshot
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 *ProjectsSnapshotsGetCall) Fields(s ...googleapi.Field) *ProjectsSnapshotsGetCall {
c.urlParams_.Set("fields", googleapi.CombineFields(s))
return c
}
// IfNoneMatch sets the optional parameter which makes the operation
// fail if the object's ETag matches the given value. This is useful for
// getting updates only after the object has changed since the last
// request. Use googleapi.IsNotModified to check whether the response
// error from Do is the result of In-None-Match.
func (c *ProjectsSnapshotsGetCall) IfNoneMatch(entityTag string) *ProjectsSnapshotsGetCall {
c.ifNoneMatch_ = entityTag
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 *ProjectsSnapshotsGetCall) Context(ctx context.Context) *ProjectsSnapshotsGetCall {
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 *ProjectsSnapshotsGetCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *ProjectsSnapshotsGetCall) 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())
if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
}
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+snapshot}")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("GET", urls, body)
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"snapshot": c.snapshot,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "pubsub.projects.snapshots.get" call.
// Exactly one of *Snapshot or error will be non-nil. Any non-2xx status
// code is an error. Response headers are in either
// *Snapshot.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 *ProjectsSnapshotsGetCall) Do(opts ...googleapi.CallOption) (*Snapshot, 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 := &Snapshot{
ServerResponse: googleapi.ServerResponse{
Header: res.Header,
HTTPStatusCode: res.StatusCode,
},
}
target := &ret
if err := gensupport.DecodeResponse(target, res); err != nil {
return nil, err
}
return ret, nil
// {
// "description": "Gets the configuration details of a snapshot.",
// "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}",
// "httpMethod": "GET",
// "id": "pubsub.projects.snapshots.get",
// "parameterOrder": [
// "snapshot"
// ],
// "parameters": {
// "snapshot": {
// "description": "The name of the snapshot to get.\nFormat is `projects/{project}/snapshots/{snap}`.",
// "location": "path",
// "pattern": "^projects/[^/]+/snapshots/[^/]+$",
// "required": true,
// "type": "string"
// }
// },
// "path": "v1/{+snapshot}",
// "response": {
// "$ref": "Snapshot"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform",
// "https://www.googleapis.com/auth/pubsub"
// ]
// }
}
// method id "pubsub.projects.snapshots.getIamPolicy":
type ProjectsSnapshotsGetIamPolicyCall struct {