Update dependencies

This commit is contained in:
Alexander Neumann 2017-09-13 14:09:48 +02:00
parent f3b49987f8
commit fda563d606
926 changed files with 189726 additions and 98666 deletions

View file

@ -960,6 +960,9 @@ type CustomDataSource struct {
// source.
ProfilesLinked []string `json:"profilesLinked,omitempty"`
// Schema: Collection of schema headers of the custom data source.
Schema []string `json:"schema,omitempty"`
// SelfLink: Link for this Analytics custom data source.
SelfLink string `json:"selfLink,omitempty"`
@ -969,6 +972,7 @@ type CustomDataSource struct {
// Updated: Time this custom data source was last modified.
Updated string `json:"updated,omitempty"`
// UploadType: Upload type of the custom data source.
UploadType string `json:"uploadType,omitempty"`
// WebPropertyId: Web property ID of the form UA-XXXXX-YY to which this
@ -5077,6 +5081,9 @@ type Upload struct {
// DELETING, DELETED.
Status string `json:"status,omitempty"`
// UploadTime: Time this file is uploaded.
UploadTime string `json:"uploadTime,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
@ -16341,11 +16348,7 @@ type ManagementUploadsUploadDataCall struct {
webPropertyId string
customDataSourceId string
urlParams_ gensupport.URLParams
media_ io.Reader
mediaBuffer_ *gensupport.MediaBuffer
mediaType_ string
mediaSize_ int64 // mediaSize, if known. Used only for calls to progressUpdater_.
progressUpdater_ googleapi.ProgressUpdater
mediaInfo_ *gensupport.MediaInfo
ctx_ context.Context
header_ http.Header
}
@ -16368,12 +16371,7 @@ func (r *ManagementUploadsService) UploadData(accountId string, webPropertyId st
// supplied.
// At most one of Media and ResumableMedia may be set.
func (c *ManagementUploadsUploadDataCall) Media(r io.Reader, options ...googleapi.MediaOption) *ManagementUploadsUploadDataCall {
opts := googleapi.ProcessMediaOptions(options)
chunkSize := opts.ChunkSize
if !opts.ForceEmptyContentType {
r, c.mediaType_ = gensupport.DetermineContentType(r, opts.ContentType)
}
c.media_, c.mediaBuffer_ = gensupport.PrepareUpload(r, chunkSize)
c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options)
return c
}
@ -16388,11 +16386,7 @@ func (c *ManagementUploadsUploadDataCall) Media(r io.Reader, options ...googleap
// supersede any context previously provided to the Context method.
func (c *ManagementUploadsUploadDataCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ManagementUploadsUploadDataCall {
c.ctx_ = ctx
rdr := gensupport.ReaderAtToReader(r, size)
rdr, c.mediaType_ = gensupport.DetermineContentType(rdr, mediaType)
c.mediaBuffer_ = gensupport.NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize)
c.media_ = nil
c.mediaSize_ = size
c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType)
return c
}
@ -16401,7 +16395,7 @@ func (c *ManagementUploadsUploadDataCall) ResumableMedia(ctx context.Context, r
// not slow down the upload operation. This should only be called when
// using ResumableMedia (as opposed to Media).
func (c *ManagementUploadsUploadDataCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ManagementUploadsUploadDataCall {
c.progressUpdater_ = pu
c.mediaInfo_.SetProgressUpdater(pu)
return c
}
@ -16441,27 +16435,16 @@ func (c *ManagementUploadsUploadDataCall) doRequest(alt string) (*http.Response,
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads")
if c.media_ != nil || c.mediaBuffer_ != nil {
if c.mediaInfo_ != nil {
urls = strings.Replace(urls, "https://www.googleapis.com/", "https://www.googleapis.com/upload/", 1)
protocol := "multipart"
if c.mediaBuffer_ != nil {
protocol = "resumable"
}
c.urlParams_.Set("uploadType", protocol)
c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType())
}
if body == nil {
body = new(bytes.Buffer)
reqHeaders.Set("Content-Type", "application/json")
}
if c.media_ != nil {
combined, ctype := gensupport.CombineBodyMedia(body, "application/json", c.media_, c.mediaType_)
defer combined.Close()
reqHeaders.Set("Content-Type", ctype)
body = combined
}
if c.mediaBuffer_ != nil && c.mediaType_ != "" {
reqHeaders.Set("X-Upload-Content-Type", c.mediaType_)
}
body, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body)
defer cleanup()
urls += "?" + c.urlParams_.Encode()
req, _ := http.NewRequest("POST", urls, body)
req.Header = reqHeaders
@ -16499,20 +16482,10 @@ func (c *ManagementUploadsUploadDataCall) Do(opts ...googleapi.CallOption) (*Upl
if err := googleapi.CheckResponse(res); err != nil {
return nil, err
}
if c.mediaBuffer_ != nil {
loc := res.Header.Get("Location")
rx := &gensupport.ResumableUpload{
Client: c.s.client,
UserAgent: c.s.userAgent(),
URI: loc,
Media: c.mediaBuffer_,
MediaType: c.mediaType_,
Callback: func(curr int64) {
if c.progressUpdater_ != nil {
c.progressUpdater_(curr, c.mediaSize_)
}
},
}
rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location"))
if rx != nil {
rx.Client = c.s.client
rx.UserAgent = c.s.userAgent()
ctx := c.ctx_
if ctx == nil {
ctx = context.TODO()