vendor: update all dependencies to latest versions
This commit is contained in:
parent
911d121bb9
commit
b017fcfe9a
3048 changed files with 537057 additions and 189681 deletions
68
vendor/google.golang.org/api/groupsmigration/v1/groupsmigration-gen.go
generated
vendored
68
vendor/google.golang.org/api/groupsmigration/v1/groupsmigration-gen.go
generated
vendored
|
@ -122,16 +122,12 @@ func (s *Groups) MarshalJSON() ([]byte, error) {
|
|||
// method id "groupsmigration.archive.insert":
|
||||
|
||||
type ArchiveInsertCall struct {
|
||||
s *Service
|
||||
groupId 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
|
||||
ctx_ context.Context
|
||||
header_ http.Header
|
||||
s *Service
|
||||
groupId string
|
||||
urlParams_ gensupport.URLParams
|
||||
mediaInfo_ *gensupport.MediaInfo
|
||||
ctx_ context.Context
|
||||
header_ http.Header
|
||||
}
|
||||
|
||||
// Insert: Inserts a new mail into the archive of the Google group.
|
||||
|
@ -150,12 +146,7 @@ func (r *ArchiveService) Insert(groupId string) *ArchiveInsertCall {
|
|||
// supplied.
|
||||
// At most one of Media and ResumableMedia may be set.
|
||||
func (c *ArchiveInsertCall) Media(r io.Reader, options ...googleapi.MediaOption) *ArchiveInsertCall {
|
||||
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
|
||||
}
|
||||
|
||||
|
@ -170,11 +161,7 @@ func (c *ArchiveInsertCall) Media(r io.Reader, options ...googleapi.MediaOption)
|
|||
// supersede any context previously provided to the Context method.
|
||||
func (c *ArchiveInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ArchiveInsertCall {
|
||||
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
|
||||
}
|
||||
|
||||
|
@ -183,7 +170,7 @@ func (c *ArchiveInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, s
|
|||
// not slow down the upload operation. This should only be called when
|
||||
// using ResumableMedia (as opposed to Media).
|
||||
func (c *ArchiveInsertCall) ProgressUpdater(pu googleapi.ProgressUpdater) *ArchiveInsertCall {
|
||||
c.progressUpdater_ = pu
|
||||
c.mediaInfo_.SetProgressUpdater(pu)
|
||||
return c
|
||||
}
|
||||
|
||||
|
@ -223,27 +210,16 @@ func (c *ArchiveInsertCall) doRequest(alt string) (*http.Response, error) {
|
|||
var body io.Reader = nil
|
||||
c.urlParams_.Set("alt", alt)
|
||||
urls := googleapi.ResolveRelative(c.s.BasePath, "{groupId}/archive")
|
||||
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
|
||||
|
@ -279,20 +255,10 @@ func (c *ArchiveInsertCall) Do(opts ...googleapi.CallOption) (*Groups, error) {
|
|||
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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue