vendor: update all dependencies to latest versions

This commit is contained in:
Nick Craig-Wood
2018-01-16 13:20:59 +00:00
parent 8e83fb6fb9
commit 7d3a17725d
4878 changed files with 1974229 additions and 201215 deletions

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

@ -143,8 +143,8 @@ type CallFunctionRequest struct {
}
func (s *CallFunctionRequest) MarshalJSON() ([]byte, error) {
type noMethod CallFunctionRequest
raw := noMethod(*s)
type NoMethod CallFunctionRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@ -186,8 +186,8 @@ type CallFunctionResponse struct {
}
func (s *CallFunctionResponse) MarshalJSON() ([]byte, error) {
type noMethod CallFunctionResponse
raw := noMethod(*s)
type NoMethod CallFunctionResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@ -271,6 +271,11 @@ type CloudFunction struct {
// You may omit `paths/*` if you want to use the main directory.
SourceRepositoryUrl string `json:"sourceRepositoryUrl,omitempty"`
// SourceUploadUrl: The Google Cloud Storage signed URL used for source
// uploading, generated
// by google.cloud.functions.v1beta2.GenerateUploadUrl
SourceUploadUrl string `json:"sourceUploadUrl,omitempty"`
// Status: Output only. Status of the function deployment.
//
// Possible values:
@ -323,8 +328,8 @@ type CloudFunction struct {
}
func (s *CloudFunction) MarshalJSON() ([]byte, error) {
type noMethod CloudFunction
raw := noMethod(*s)
type NoMethod CloudFunction
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@ -339,13 +344,15 @@ type EventTrigger struct {
// `providers/*/eventTypes/*` e.g. Directly handle a Message published
// to
// Google Cloud Pub/Sub
// `providers/cloud.pubsub/eventTypes/topic.publish`
// `providers/cloud.pubsub/eventTypes/topic.publish`.
//
// Handle an object changing in Google Cloud Storage
// `providers/cloud.storage/eventTypes/object.change`
// Handle an object changing in Google Cloud
// Storage:
// `providers/cloud.storage/eventTypes/object.change`
//
// Handle a write to the Firebase Realtime Database
// `providers/google.firebase.database/eventTypes/ref.write`
// Handle a write to the Firebase Realtime
// Database:
// `providers/google.firebase.database/eventTypes/ref.write`
EventType string `json:"eventType,omitempty"`
// FailurePolicy: Specifies policy for failed executions.
@ -368,7 +375,7 @@ type EventTrigger struct {
// will
// be used. For example, `storage.googleapis.com` is the default for
// all
// event types in the 'google.storage` namespace.
// event types in the `google.storage` namespace.
Service string `json:"service,omitempty"`
// ForceSendFields is a list of field names (e.g. "EventType") to
@ -389,8 +396,8 @@ type EventTrigger struct {
}
func (s *EventTrigger) MarshalJSON() ([]byte, error) {
type noMethod EventTrigger
raw := noMethod(*s)
type NoMethod EventTrigger
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@ -421,8 +428,111 @@ type FailurePolicy struct {
}
func (s *FailurePolicy) MarshalJSON() ([]byte, error) {
type noMethod FailurePolicy
raw := noMethod(*s)
type NoMethod FailurePolicy
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GenerateDownloadUrlRequest: Request of `GenerateDownloadUrl` method.
type GenerateDownloadUrlRequest struct {
// VersionId: The optional version of function.
VersionId uint64 `json:"versionId,omitempty,string"`
// ForceSendFields is a list of field names (e.g. "VersionId") 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. "VersionId") 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 *GenerateDownloadUrlRequest) MarshalJSON() ([]byte, error) {
type NoMethod GenerateDownloadUrlRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GenerateDownloadUrlResponse: Response of `GenerateDownloadUrl`
// method.
type GenerateDownloadUrlResponse struct {
// DownloadUrl: The generated Google Cloud Storage signed URL that
// should be used for
// function source code download.
DownloadUrl string `json:"downloadUrl,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "DownloadUrl") 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. "DownloadUrl") 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 *GenerateDownloadUrlResponse) MarshalJSON() ([]byte, error) {
type NoMethod GenerateDownloadUrlResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GenerateUploadUrlRequest: Request of `GenerateUploadUrl` method.
type GenerateUploadUrlRequest struct {
}
// GenerateUploadUrlResponse: Response of `GenerateUploadUrl` method.
type GenerateUploadUrlResponse struct {
// UploadUrl: The generated Google Cloud Storage signed URL that should
// be used for a
// function source code upload. The uploaded file should be a zip
// archive
// which contains a function.
UploadUrl string `json:"uploadUrl,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "UploadUrl") 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. "UploadUrl") 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 *GenerateUploadUrlResponse) MarshalJSON() ([]byte, error) {
type NoMethod GenerateUploadUrlResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@ -450,8 +560,8 @@ type HTTPSTrigger struct {
}
func (s *HTTPSTrigger) MarshalJSON() ([]byte, error) {
type noMethod HTTPSTrigger
raw := noMethod(*s)
type NoMethod HTTPSTrigger
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@ -490,8 +600,8 @@ type ListFunctionsResponse struct {
}
func (s *ListFunctionsResponse) MarshalJSON() ([]byte, error) {
type noMethod ListFunctionsResponse
raw := noMethod(*s)
type NoMethod ListFunctionsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@ -527,8 +637,8 @@ type ListLocationsResponse struct {
}
func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
type noMethod ListLocationsResponse
raw := noMethod(*s)
type NoMethod ListLocationsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@ -564,8 +674,8 @@ type ListOperationsResponse struct {
}
func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
type noMethod ListOperationsResponse
raw := noMethod(*s)
type NoMethod ListOperationsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@ -608,8 +718,8 @@ type Location struct {
}
func (s *Location) MarshalJSON() ([]byte, error) {
type noMethod Location
raw := noMethod(*s)
type NoMethod Location
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@ -683,8 +793,58 @@ type Operation struct {
}
func (s *Operation) MarshalJSON() ([]byte, error) {
type noMethod Operation
raw := noMethod(*s)
type NoMethod Operation
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// OperationMetadataV1: Metadata describing an Operation
type OperationMetadataV1 struct {
// Request: The original request that started the operation.
Request googleapi.RawMessage `json:"request,omitempty"`
// Target: Target of the operation - for
// example
// projects/project-1/locations/region-1/functions/function-1
Target string `json:"target,omitempty"`
// Type: Type of operation.
//
// Possible values:
// "OPERATION_UNSPECIFIED" - Unknown operation type.
// "CREATE_FUNCTION" - Triggered by CreateFunction call
// "UPDATE_FUNCTION" - Triggered by UpdateFunction call
// "DELETE_FUNCTION" - Triggered by DeleteFunction call.
Type string `json:"type,omitempty"`
// UpdateTime: The last update timestamp of the operation.
UpdateTime string `json:"updateTime,omitempty"`
// VersionId: Version id of the function created or updated by an API
// call.
// This field is only pupulated for Create and Update operations.
VersionId int64 `json:"versionId,omitempty,string"`
// ForceSendFields is a list of field names (e.g. "Request") 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. "Request") 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 *OperationMetadataV1) MarshalJSON() ([]byte, error) {
type NoMethod OperationMetadataV1
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@ -707,6 +867,9 @@ type OperationMetadataV1Beta2 struct {
// "DELETE_FUNCTION" - Triggered by DeleteFunction call.
Type string `json:"type,omitempty"`
// UpdateTime: The last update timestamp of the operation.
UpdateTime string `json:"updateTime,omitempty"`
// VersionId: Version id of the function created or updated by an API
// call.
// This field is only pupulated for Create and Update operations.
@ -730,8 +893,8 @@ type OperationMetadataV1Beta2 struct {
}
func (s *OperationMetadataV1Beta2) MarshalJSON() ([]byte, error) {
type noMethod OperationMetadataV1Beta2
raw := noMethod(*s)
type NoMethod OperationMetadataV1Beta2
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@ -807,8 +970,8 @@ type SourceRepository struct {
}
func (s *SourceRepository) MarshalJSON() ([]byte, error) {
type noMethod SourceRepository
raw := noMethod(*s)
type NoMethod SourceRepository
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@ -926,8 +1089,8 @@ type Status struct {
}
func (s *Status) MarshalJSON() ([]byte, error) {
type noMethod Status
raw := noMethod(*s)
type NoMethod Status
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
@ -1042,7 +1205,7 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error)
},
}
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
@ -1220,7 +1383,7 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsRe
},
}
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
@ -1414,7 +1577,7 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocat
},
}
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
@ -1585,7 +1748,7 @@ func (c *ProjectsLocationsFunctionsCallCall) Do(opts ...googleapi.CallOption) (*
},
}
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
@ -1724,7 +1887,7 @@ func (c *ProjectsLocationsFunctionsCreateCall) Do(opts ...googleapi.CallOption)
},
}
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
@ -1856,7 +2019,7 @@ func (c *ProjectsLocationsFunctionsDeleteCall) Do(opts ...googleapi.CallOption)
},
}
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
@ -1888,6 +2051,304 @@ func (c *ProjectsLocationsFunctionsDeleteCall) Do(opts ...googleapi.CallOption)
}
// method id "cloudfunctions.projects.locations.functions.generateDownloadUrl":
type ProjectsLocationsFunctionsGenerateDownloadUrlCall struct {
s *Service
name string
generatedownloadurlrequest *GenerateDownloadUrlRequest
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// GenerateDownloadUrl: Returns a signed URL for downloading deployed
// function source code.
// The URL is only valid for a limited period and should be used
// within
// minutes after generation.
// For more information about the signed URL usage
// see:
// https://cloud.google.com/storage/docs/access-control/signed-urls
func (r *ProjectsLocationsFunctionsService) GenerateDownloadUrl(name string, generatedownloadurlrequest *GenerateDownloadUrlRequest) *ProjectsLocationsFunctionsGenerateDownloadUrlCall {
c := &ProjectsLocationsFunctionsGenerateDownloadUrlCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.name = name
c.generatedownloadurlrequest = generatedownloadurlrequest
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 *ProjectsLocationsFunctionsGenerateDownloadUrlCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsGenerateDownloadUrlCall {
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 *ProjectsLocationsFunctionsGenerateDownloadUrlCall) Context(ctx context.Context) *ProjectsLocationsFunctionsGenerateDownloadUrlCall {
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 *ProjectsLocationsFunctionsGenerateDownloadUrlCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *ProjectsLocationsFunctionsGenerateDownloadUrlCall) 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.generatedownloadurlrequest)
if err != nil {
return nil, err
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}:generateDownloadUrl")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"name": c.name,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "cloudfunctions.projects.locations.functions.generateDownloadUrl" call.
// Exactly one of *GenerateDownloadUrlResponse or error will be non-nil.
// Any non-2xx status code is an error. Response headers are in either
// *GenerateDownloadUrlResponse.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 *ProjectsLocationsFunctionsGenerateDownloadUrlCall) Do(opts ...googleapi.CallOption) (*GenerateDownloadUrlResponse, 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 := &GenerateDownloadUrlResponse{
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": "Returns a signed URL for downloading deployed function source code.\nThe URL is only valid for a limited period and should be used within\nminutes after generation.\nFor more information about the signed URL usage see:\nhttps://cloud.google.com/storage/docs/access-control/signed-urls",
// "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:generateDownloadUrl",
// "httpMethod": "POST",
// "id": "cloudfunctions.projects.locations.functions.generateDownloadUrl",
// "parameterOrder": [
// "name"
// ],
// "parameters": {
// "name": {
// "description": "The name of function for which source code Google Cloud Storage signed\nURL should be generated.",
// "location": "path",
// "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$",
// "required": true,
// "type": "string"
// }
// },
// "path": "v1beta2/{+name}:generateDownloadUrl",
// "request": {
// "$ref": "GenerateDownloadUrlRequest"
// },
// "response": {
// "$ref": "GenerateDownloadUrlResponse"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform"
// ]
// }
}
// method id "cloudfunctions.projects.locations.functions.generateUploadUrl":
type ProjectsLocationsFunctionsGenerateUploadUrlCall struct {
s *Service
parent string
generateuploadurlrequest *GenerateUploadUrlRequest
urlParams_ gensupport.URLParams
ctx_ context.Context
header_ http.Header
}
// GenerateUploadUrl: Returns a signed URL for uploading a function
// source code.
// For more information about the signed URL usage
// see:
// https://cloud.google.com/storage/docs/access-control/signed-urls
//
// Once the function source code upload is complete, the used signed
// URL should be provided in CreateFunction or UpdateFunction request
// as a reference to the function source code.
//
// When uploading source code to the generated signed URL, please
// follow
// these restrictions:
//
// * Source file type should be a zip file.
// * Source file size should not exceed 100MB limit.
//
// When making a HTTP PUT request, these two headers need to be
// specified:
//
// * `content-type: application/zip`
// * `x-google-content-length-range: 0,104857600`
func (r *ProjectsLocationsFunctionsService) GenerateUploadUrl(parent string, generateuploadurlrequest *GenerateUploadUrlRequest) *ProjectsLocationsFunctionsGenerateUploadUrlCall {
c := &ProjectsLocationsFunctionsGenerateUploadUrlCall{s: r.s, urlParams_: make(gensupport.URLParams)}
c.parent = parent
c.generateuploadurlrequest = generateuploadurlrequest
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 *ProjectsLocationsFunctionsGenerateUploadUrlCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsGenerateUploadUrlCall {
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 *ProjectsLocationsFunctionsGenerateUploadUrlCall) Context(ctx context.Context) *ProjectsLocationsFunctionsGenerateUploadUrlCall {
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 *ProjectsLocationsFunctionsGenerateUploadUrlCall) Header() http.Header {
if c.header_ == nil {
c.header_ = make(http.Header)
}
return c.header_
}
func (c *ProjectsLocationsFunctionsGenerateUploadUrlCall) 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.generateuploadurlrequest)
if err != nil {
return nil, err
}
reqHeaders.Set("Content-Type", "application/json")
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/functions:generateUploadUrl")
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
req.Header = reqHeaders
googleapi.Expand(req.URL, map[string]string{
"parent": c.parent,
})
return gensupport.SendRequest(c.ctx_, c.s.client, req)
}
// Do executes the "cloudfunctions.projects.locations.functions.generateUploadUrl" call.
// Exactly one of *GenerateUploadUrlResponse or error will be non-nil.
// Any non-2xx status code is an error. Response headers are in either
// *GenerateUploadUrlResponse.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 *ProjectsLocationsFunctionsGenerateUploadUrlCall) Do(opts ...googleapi.CallOption) (*GenerateUploadUrlResponse, 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 := &GenerateUploadUrlResponse{
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": "Returns a signed URL for uploading a function source code.\nFor more information about the signed URL usage see:\nhttps://cloud.google.com/storage/docs/access-control/signed-urls\nOnce the function source code upload is complete, the used signed\nURL should be provided in CreateFunction or UpdateFunction request\nas a reference to the function source code.\n\nWhen uploading source code to the generated signed URL, please follow\nthese restrictions:\n\n* Source file type should be a zip file.\n* Source file size should not exceed 100MB limit.\n\nWhen making a HTTP PUT request, these two headers need to be specified:\n\n* `content-type: application/zip`\n* `x-google-content-length-range: 0,104857600`",
// "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/functions:generateUploadUrl",
// "httpMethod": "POST",
// "id": "cloudfunctions.projects.locations.functions.generateUploadUrl",
// "parameterOrder": [
// "parent"
// ],
// "parameters": {
// "parent": {
// "description": "The project and location in which the Google Cloud Storage signed URL\nshould be generated, specified in the format `projects/*/locations/*`.",
// "location": "path",
// "pattern": "^projects/[^/]+/locations/[^/]+$",
// "required": true,
// "type": "string"
// }
// },
// "path": "v1beta2/{+parent}/functions:generateUploadUrl",
// "request": {
// "$ref": "GenerateUploadUrlRequest"
// },
// "response": {
// "$ref": "GenerateUploadUrlResponse"
// },
// "scopes": [
// "https://www.googleapis.com/auth/cloud-platform"
// ]
// }
}
// method id "cloudfunctions.projects.locations.functions.get":
type ProjectsLocationsFunctionsGetCall struct {
@ -1996,7 +2457,7 @@ func (c *ProjectsLocationsFunctionsGetCall) Do(opts ...googleapi.CallOption) (*C
},
}
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
@ -2154,7 +2615,7 @@ func (c *ProjectsLocationsFunctionsListCall) Do(opts ...googleapi.CallOption) (*
},
}
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
@ -2318,7 +2779,7 @@ func (c *ProjectsLocationsFunctionsUpdateCall) Do(opts ...googleapi.CallOption)
},
}
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