Add golang.org/x/net/context support.
Add a Context method to every call object which associates a context
with the call's Do (and Download) method. Make sure all HTTP calls
are made context-aware when a context is available.
Change-Id: I493cce4d43411810eb30b6c02dc151ef970a6254
Reviewed-on: https://code-review.googlesource.com/3472
Reviewed-by: Michael McGreevy <mcgreevy@golang.org>
diff --git a/adexchangebuyer/v1.2/adexchangebuyer-gen.go b/adexchangebuyer/v1.2/adexchangebuyer-gen.go
index fa21b6c..2af426b 100644
--- a/adexchangebuyer/v1.2/adexchangebuyer-gen.go
+++ b/adexchangebuyer/v1.2/adexchangebuyer-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "adexchangebuyer:v1.2"
const apiName = "adexchangebuyer"
@@ -310,6 +310,7 @@
s *Service
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one account by ID.
@@ -327,6 +328,14 @@
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 *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -341,6 +350,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -390,6 +402,7 @@
type AccountsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the authenticated user's list of accounts.
@@ -406,6 +419,14 @@
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 *AccountsListCall) Context(ctx context.Context) *AccountsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -418,6 +439,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -457,6 +481,7 @@
id int64
account *Account
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing account. This method supports patch
@@ -476,6 +501,14 @@
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 *AccountsPatchCall) Context(ctx context.Context) *AccountsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
@@ -496,6 +529,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -550,6 +586,7 @@
id int64
account *Account
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing account.
@@ -568,6 +605,14 @@
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 *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
@@ -588,6 +633,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -642,6 +690,7 @@
accountId int64
buyerCreativeId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the status for a single creative. A creative will be
@@ -661,6 +710,14 @@
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 *CreativesGetCall) Context(ctx context.Context) *CreativesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -676,6 +733,9 @@
"buyerCreativeId": c.buyerCreativeId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -733,6 +793,7 @@
s *Service
creative *Creative
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Submit a new creative.
@@ -750,6 +811,14 @@
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 *CreativesInsertCall) Context(ctx context.Context) *CreativesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
@@ -768,6 +837,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -808,6 +880,7 @@
type CreativesListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of the authenticated user's active creatives.
@@ -854,6 +927,14 @@
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 *CreativesListCall) Context(ctx context.Context) *CreativesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -875,6 +956,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/adexchangebuyer/v1.3/adexchangebuyer-gen.go b/adexchangebuyer/v1.3/adexchangebuyer-gen.go
index 9672feb..15e5375 100644
--- a/adexchangebuyer/v1.3/adexchangebuyer-gen.go
+++ b/adexchangebuyer/v1.3/adexchangebuyer-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "adexchangebuyer:v1.3"
const apiName = "adexchangebuyer"
@@ -794,6 +794,7 @@
s *Service
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one account by ID.
@@ -811,6 +812,14 @@
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 *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -825,6 +834,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -874,6 +886,7 @@
type AccountsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the authenticated user's list of accounts.
@@ -890,6 +903,14 @@
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 *AccountsListCall) Context(ctx context.Context) *AccountsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -902,6 +923,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -941,6 +965,7 @@
id int64
account *Account
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing account. This method supports patch
@@ -960,6 +985,14 @@
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 *AccountsPatchCall) Context(ctx context.Context) *AccountsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
@@ -980,6 +1013,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1034,6 +1070,7 @@
id int64
account *Account
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing account.
@@ -1052,6 +1089,14 @@
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 *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
@@ -1072,6 +1117,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1125,6 +1173,7 @@
s *Service
accountId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the billing information for one account specified by
@@ -1143,6 +1192,14 @@
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 *BillingInfoGetCall) Context(ctx context.Context) *BillingInfoGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BillingInfoGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1157,6 +1214,9 @@
"accountId": strconv.FormatInt(c.accountId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1206,6 +1266,7 @@
type BillingInfoListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of billing information for all accounts of the
@@ -1223,6 +1284,14 @@
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 *BillingInfoListCall) Context(ctx context.Context) *BillingInfoListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BillingInfoListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1235,6 +1304,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1274,6 +1346,7 @@
accountId int64
billingId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the budget information for the adgroup specified by the
@@ -1293,6 +1366,14 @@
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 *BudgetGetCall) Context(ctx context.Context) *BudgetGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BudgetGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1308,6 +1389,9 @@
"billingId": strconv.FormatInt(c.billingId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1368,6 +1452,7 @@
billingId int64
budget *Budget
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates the budget amount for the budget of the adgroup
@@ -1389,6 +1474,14 @@
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 *BudgetPatchCall) Context(ctx context.Context) *BudgetPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BudgetPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.budget)
@@ -1410,6 +1503,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1473,6 +1569,7 @@
billingId int64
budget *Budget
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates the budget amount for the budget of the adgroup
@@ -1494,6 +1591,14 @@
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 *BudgetUpdateCall) Context(ctx context.Context) *BudgetUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BudgetUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.budget)
@@ -1515,6 +1620,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1577,6 +1685,7 @@
accountId int64
buyerCreativeId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the status for a single creative. A creative will be
@@ -1596,6 +1705,14 @@
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 *CreativesGetCall) Context(ctx context.Context) *CreativesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1611,6 +1728,9 @@
"buyerCreativeId": c.buyerCreativeId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1668,6 +1788,7 @@
s *Service
creative *Creative
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Submit a new creative.
@@ -1685,6 +1806,14 @@
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 *CreativesInsertCall) Context(ctx context.Context) *CreativesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
@@ -1703,6 +1832,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1743,6 +1875,7 @@
type CreativesListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of the authenticated user's active creatives.
@@ -1804,6 +1937,14 @@
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 *CreativesListCall) Context(ctx context.Context) *CreativesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1831,6 +1972,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1912,6 +2056,7 @@
s *Service
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one direct deal by ID.
@@ -1929,6 +2074,14 @@
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 *DirectDealsGetCall) Context(ctx context.Context) *DirectDealsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DirectDealsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1943,6 +2096,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1992,6 +2148,7 @@
type DirectDealsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the authenticated user's list of direct deals.
@@ -2008,6 +2165,14 @@
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 *DirectDealsListCall) Context(ctx context.Context) *DirectDealsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DirectDealsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2020,6 +2185,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2060,6 +2228,7 @@
endDateTime string
startDateTime string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the authenticated user's list of performance metrics.
@@ -2096,6 +2265,14 @@
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 *PerformanceReportListCall) Context(ctx context.Context) *PerformanceReportListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PerformanceReportListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2117,6 +2294,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2195,6 +2375,7 @@
accountId int64
configId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing pretargeting config.
@@ -2213,6 +2394,14 @@
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 *PretargetingConfigDeleteCall) Context(ctx context.Context) *PretargetingConfigDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PretargetingConfigDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2228,6 +2417,9 @@
"configId": strconv.FormatInt(c.configId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2280,6 +2472,7 @@
accountId int64
configId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a specific pretargeting configuration
@@ -2298,6 +2491,14 @@
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 *PretargetingConfigGetCall) Context(ctx context.Context) *PretargetingConfigGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PretargetingConfigGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2313,6 +2514,9 @@
"configId": strconv.FormatInt(c.configId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2372,6 +2576,7 @@
accountId int64
pretargetingconfig *PretargetingConfig
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new pretargeting configuration.
@@ -2390,6 +2595,14 @@
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 *PretargetingConfigInsertCall) Context(ctx context.Context) *PretargetingConfigInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PretargetingConfigInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.pretargetingconfig)
@@ -2410,6 +2623,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2463,6 +2679,7 @@
s *Service
accountId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of the authenticated user's pretargeting
@@ -2481,6 +2698,14 @@
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 *PretargetingConfigListCall) Context(ctx context.Context) *PretargetingConfigListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PretargetingConfigListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2495,6 +2720,9 @@
"accountId": strconv.FormatInt(c.accountId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2547,6 +2775,7 @@
configId int64
pretargetingconfig *PretargetingConfig
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing pretargeting config. This method supports
@@ -2567,6 +2796,14 @@
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 *PretargetingConfigPatchCall) Context(ctx context.Context) *PretargetingConfigPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PretargetingConfigPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.pretargetingconfig)
@@ -2588,6 +2825,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2651,6 +2891,7 @@
configId int64
pretargetingconfig *PretargetingConfig
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing pretargeting config.
@@ -2670,6 +2911,14 @@
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 *PretargetingConfigUpdateCall) Context(ctx context.Context) *PretargetingConfigUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PretargetingConfigUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.pretargetingconfig)
@@ -2691,6 +2940,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/adexchangebuyer/v1.4/adexchangebuyer-gen.go b/adexchangebuyer/v1.4/adexchangebuyer-gen.go
index 32ad9f1..403d202 100644
--- a/adexchangebuyer/v1.4/adexchangebuyer-gen.go
+++ b/adexchangebuyer/v1.4/adexchangebuyer-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "adexchangebuyer:v1.4"
const apiName = "adexchangebuyer"
@@ -1932,6 +1932,7 @@
s *Service
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one account by ID.
@@ -1949,6 +1950,14 @@
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 *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1963,6 +1972,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2012,6 +2024,7 @@
type AccountsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the authenticated user's list of accounts.
@@ -2028,6 +2041,14 @@
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 *AccountsListCall) Context(ctx context.Context) *AccountsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2040,6 +2061,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2079,6 +2103,7 @@
id int64
account *Account
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing account. This method supports patch
@@ -2098,6 +2123,14 @@
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 *AccountsPatchCall) Context(ctx context.Context) *AccountsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
@@ -2118,6 +2151,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2172,6 +2208,7 @@
id int64
account *Account
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing account.
@@ -2190,6 +2227,14 @@
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 *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
@@ -2210,6 +2255,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2263,6 +2311,7 @@
s *Service
accountId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the billing information for one account specified by
@@ -2281,6 +2330,14 @@
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 *BillingInfoGetCall) Context(ctx context.Context) *BillingInfoGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BillingInfoGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2295,6 +2352,9 @@
"accountId": strconv.FormatInt(c.accountId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2344,6 +2404,7 @@
type BillingInfoListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of billing information for all accounts of the
@@ -2361,6 +2422,14 @@
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 *BillingInfoListCall) Context(ctx context.Context) *BillingInfoListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BillingInfoListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2373,6 +2442,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2412,6 +2484,7 @@
accountId int64
billingId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the budget information for the adgroup specified by the
@@ -2431,6 +2504,14 @@
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 *BudgetGetCall) Context(ctx context.Context) *BudgetGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BudgetGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2446,6 +2527,9 @@
"billingId": strconv.FormatInt(c.billingId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2506,6 +2590,7 @@
billingId int64
budget *Budget
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates the budget amount for the budget of the adgroup
@@ -2527,6 +2612,14 @@
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 *BudgetPatchCall) Context(ctx context.Context) *BudgetPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BudgetPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.budget)
@@ -2548,6 +2641,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2611,6 +2707,7 @@
billingId int64
budget *Budget
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates the budget amount for the budget of the adgroup
@@ -2632,6 +2729,14 @@
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 *BudgetUpdateCall) Context(ctx context.Context) *BudgetUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BudgetUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.budget)
@@ -2653,6 +2758,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2715,6 +2823,7 @@
clientAccountId int64
sponsorAccountId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete:
@@ -2733,6 +2842,14 @@
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 *ClientaccessDeleteCall) Context(ctx context.Context) *ClientaccessDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ClientaccessDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2748,6 +2865,9 @@
"clientAccountId": strconv.FormatInt(c.clientAccountId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2797,6 +2917,7 @@
clientAccountId int64
sponsorAccountId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get:
@@ -2815,6 +2936,14 @@
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 *ClientaccessGetCall) Context(ctx context.Context) *ClientaccessGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ClientaccessGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2830,6 +2959,9 @@
"clientAccountId": strconv.FormatInt(c.clientAccountId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2885,6 +3017,7 @@
s *Service
clientaccesscapabilities *ClientAccessCapabilities
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert:
@@ -2914,6 +3047,14 @@
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 *ClientaccessInsertCall) Context(ctx context.Context) *ClientaccessInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ClientaccessInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.clientaccesscapabilities)
@@ -2938,6 +3079,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2990,6 +3134,7 @@
s *Service
listclientaccesscapabilitiesrequest *ListClientAccessCapabilitiesRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List:
@@ -3007,6 +3152,14 @@
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 *ClientaccessListCall) Context(ctx context.Context) *ClientaccessListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ClientaccessListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3019,6 +3172,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3061,6 +3217,7 @@
sponsorAccountId int64
clientaccesscapabilities *ClientAccessCapabilities
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch:
@@ -3080,6 +3237,14 @@
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 *ClientaccessPatchCall) Context(ctx context.Context) *ClientaccessPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ClientaccessPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.clientaccesscapabilities)
@@ -3101,6 +3266,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3161,6 +3329,7 @@
sponsorAccountId int64
clientaccesscapabilities *ClientAccessCapabilities
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update:
@@ -3180,6 +3349,14 @@
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 *ClientaccessUpdateCall) Context(ctx context.Context) *ClientaccessUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ClientaccessUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.clientaccesscapabilities)
@@ -3201,6 +3378,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3260,6 +3440,7 @@
accountId int64
buyerCreativeId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the status for a single creative. A creative will be
@@ -3279,6 +3460,14 @@
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 *CreativesGetCall) Context(ctx context.Context) *CreativesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3294,6 +3483,9 @@
"buyerCreativeId": c.buyerCreativeId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3351,6 +3543,7 @@
s *Service
creative *Creative
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Submit a new creative.
@@ -3368,6 +3561,14 @@
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 *CreativesInsertCall) Context(ctx context.Context) *CreativesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
@@ -3386,6 +3587,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3426,6 +3630,7 @@
type CreativesListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of the authenticated user's active creatives.
@@ -3511,6 +3716,14 @@
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 *CreativesListCall) Context(ctx context.Context) *CreativesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3541,6 +3754,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3642,6 +3858,7 @@
dealId int64
getfinalizednegotiationbyexternaldealidrequest *GetFinalizedNegotiationByExternalDealIdRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the requested deal.
@@ -3660,6 +3877,14 @@
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 *DealsGetCall) Context(ctx context.Context) *DealsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DealsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3674,6 +3899,9 @@
"dealId": strconv.FormatInt(c.dealId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3727,6 +3955,7 @@
orderId string
deleteorderdealsrequest *DeleteOrderDealsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete the specified deals from the order
@@ -3745,6 +3974,14 @@
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 *MarketplacedealsDeleteCall) Context(ctx context.Context) *MarketplacedealsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MarketplacedealsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.deleteorderdealsrequest)
@@ -3765,6 +4002,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3818,6 +4058,7 @@
orderId string
addorderdealsrequest *AddOrderDealsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Add new deals for the specified order
@@ -3836,6 +4077,14 @@
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 *MarketplacedealsInsertCall) Context(ctx context.Context) *MarketplacedealsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MarketplacedealsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.addorderdealsrequest)
@@ -3856,6 +4105,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3908,6 +4160,7 @@
s *Service
orderId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all the deals for a given order
@@ -3925,6 +4178,14 @@
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 *MarketplacedealsListCall) Context(ctx context.Context) *MarketplacedealsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MarketplacedealsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3939,6 +4200,9 @@
"orderId": c.orderId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3989,6 +4253,7 @@
orderId string
editallorderdealsrequest *EditAllOrderDealsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Replaces all the deals in the order with the passed in deals
@@ -4007,6 +4272,14 @@
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 *MarketplacedealsUpdateCall) Context(ctx context.Context) *MarketplacedealsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MarketplacedealsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.editallorderdealsrequest)
@@ -4027,6 +4300,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4080,6 +4356,7 @@
orderId string
addordernotesrequest *AddOrderNotesRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Add notes to the order
@@ -4098,6 +4375,14 @@
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 *MarketplacenotesInsertCall) Context(ctx context.Context) *MarketplacenotesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MarketplacenotesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.addordernotesrequest)
@@ -4118,6 +4403,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4170,6 +4458,7 @@
s *Service
orderId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Get all the notes associated with an order
@@ -4187,6 +4476,14 @@
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 *MarketplacenotesListCall) Context(ctx context.Context) *MarketplacenotesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MarketplacenotesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4201,6 +4498,9 @@
"orderId": c.orderId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4250,6 +4550,7 @@
s *Service
offerId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the requested negotiation.
@@ -4267,6 +4568,14 @@
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 *MarketplaceoffersGetCall) Context(ctx context.Context) *MarketplaceoffersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MarketplaceoffersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4281,6 +4590,9 @@
"offerId": c.offerId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4329,6 +4641,7 @@
type MarketplaceoffersSearchCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Search: Gets the requested negotiation.
@@ -4352,6 +4665,14 @@
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 *MarketplaceoffersSearchCall) Context(ctx context.Context) *MarketplaceoffersSearchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MarketplaceoffersSearchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4367,6 +4688,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4412,6 +4736,7 @@
s *Service
orderId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get an order given its id
@@ -4429,6 +4754,14 @@
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 *MarketplaceordersGetCall) Context(ctx context.Context) *MarketplaceordersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MarketplaceordersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4443,6 +4776,9 @@
"orderId": c.orderId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4492,6 +4828,7 @@
s *Service
createordersrequest *CreateOrdersRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Create the given list of orders
@@ -4509,6 +4846,14 @@
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 *MarketplaceordersInsertCall) Context(ctx context.Context) *MarketplaceordersInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MarketplaceordersInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.createordersrequest)
@@ -4527,6 +4872,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4571,6 +4919,7 @@
updateAction string
marketplaceorder *MarketplaceOrder
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Update the given order. This method supports patch semantics.
@@ -4591,6 +4940,14 @@
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 *MarketplaceordersPatchCall) Context(ctx context.Context) *MarketplaceordersPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MarketplaceordersPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.marketplaceorder)
@@ -4613,6 +4970,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4693,6 +5053,7 @@
type MarketplaceordersSearchCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Search: Search for orders using pql query
@@ -4716,6 +5077,14 @@
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 *MarketplaceordersSearchCall) Context(ctx context.Context) *MarketplaceordersSearchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MarketplaceordersSearchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4731,6 +5100,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4779,6 +5151,7 @@
updateAction string
marketplaceorder *MarketplaceOrder
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Update the given order
@@ -4799,6 +5172,14 @@
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 *MarketplaceordersUpdateCall) Context(ctx context.Context) *MarketplaceordersUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MarketplaceordersUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.marketplaceorder)
@@ -4821,6 +5202,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4903,6 +5287,7 @@
negotiationId int64
negotiationrounddto *NegotiationRoundDto
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Adds the requested negotiationRound to the requested
@@ -4922,6 +5307,14 @@
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 *NegotiationroundsInsertCall) Context(ctx context.Context) *NegotiationroundsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *NegotiationroundsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.negotiationrounddto)
@@ -4942,6 +5335,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4995,6 +5391,7 @@
negotiationId int64
getnegotiationbyidrequest *GetNegotiationByIdRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the requested negotiation.
@@ -5013,6 +5410,14 @@
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 *NegotiationsGetCall) Context(ctx context.Context) *NegotiationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *NegotiationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5027,6 +5432,9 @@
"negotiationId": strconv.FormatInt(c.negotiationId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5079,6 +5487,7 @@
s *Service
negotiationdto *NegotiationDto
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates or updates the requested negotiation.
@@ -5096,6 +5505,14 @@
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 *NegotiationsInsertCall) Context(ctx context.Context) *NegotiationsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *NegotiationsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.negotiationdto)
@@ -5114,6 +5531,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5155,6 +5575,7 @@
s *Service
getnegotiationsrequest *GetNegotiationsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all negotiations the authenticated user has access to.
@@ -5172,6 +5593,14 @@
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 *NegotiationsListCall) Context(ctx context.Context) *NegotiationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *NegotiationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5184,6 +5613,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5225,6 +5657,7 @@
s *Service
offerId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the requested offer.
@@ -5242,6 +5675,14 @@
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 *OffersGetCall) Context(ctx context.Context) *OffersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OffersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5256,6 +5697,9 @@
"offerId": strconv.FormatInt(c.offerId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5305,6 +5749,7 @@
s *Service
offerdto *OfferDto
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates or updates the requested offer.
@@ -5322,6 +5767,14 @@
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 *OffersInsertCall) Context(ctx context.Context) *OffersInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OffersInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.offerdto)
@@ -5340,6 +5793,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5381,6 +5837,7 @@
s *Service
listoffersrequest *ListOffersRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all offers the authenticated user has access to.
@@ -5398,6 +5855,14 @@
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 *OffersListCall) Context(ctx context.Context) *OffersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OffersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5410,6 +5875,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5453,6 +5921,7 @@
endDateTime string
startDateTime string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the authenticated user's list of performance metrics.
@@ -5489,6 +5958,14 @@
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 *PerformanceReportListCall) Context(ctx context.Context) *PerformanceReportListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PerformanceReportListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5510,6 +5987,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5588,6 +6068,7 @@
accountId int64
configId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing pretargeting config.
@@ -5606,6 +6087,14 @@
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 *PretargetingConfigDeleteCall) Context(ctx context.Context) *PretargetingConfigDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PretargetingConfigDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5621,6 +6110,9 @@
"configId": strconv.FormatInt(c.configId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5673,6 +6165,7 @@
accountId int64
configId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a specific pretargeting configuration
@@ -5691,6 +6184,14 @@
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 *PretargetingConfigGetCall) Context(ctx context.Context) *PretargetingConfigGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PretargetingConfigGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5706,6 +6207,9 @@
"configId": strconv.FormatInt(c.configId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5765,6 +6269,7 @@
accountId int64
pretargetingconfig *PretargetingConfig
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new pretargeting configuration.
@@ -5783,6 +6288,14 @@
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 *PretargetingConfigInsertCall) Context(ctx context.Context) *PretargetingConfigInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PretargetingConfigInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.pretargetingconfig)
@@ -5803,6 +6316,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5856,6 +6372,7 @@
s *Service
accountId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of the authenticated user's pretargeting
@@ -5874,6 +6391,14 @@
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 *PretargetingConfigListCall) Context(ctx context.Context) *PretargetingConfigListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PretargetingConfigListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5888,6 +6413,9 @@
"accountId": strconv.FormatInt(c.accountId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5940,6 +6468,7 @@
configId int64
pretargetingconfig *PretargetingConfig
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing pretargeting config. This method supports
@@ -5960,6 +6489,14 @@
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 *PretargetingConfigPatchCall) Context(ctx context.Context) *PretargetingConfigPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PretargetingConfigPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.pretargetingconfig)
@@ -5981,6 +6518,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6044,6 +6584,7 @@
configId int64
pretargetingconfig *PretargetingConfig
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing pretargeting config.
@@ -6063,6 +6604,14 @@
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 *PretargetingConfigUpdateCall) Context(ctx context.Context) *PretargetingConfigUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PretargetingConfigUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.pretargetingconfig)
@@ -6084,6 +6633,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/adexchangeseller/v1.1/adexchangeseller-gen.go b/adexchangeseller/v1.1/adexchangeseller-gen.go
index 2fdac0d..66a49a5 100644
--- a/adexchangeseller/v1.1/adexchangeseller-gen.go
+++ b/adexchangeseller/v1.1/adexchangeseller-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "adexchangeseller:v1.1"
const apiName = "adexchangeseller"
@@ -623,6 +623,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get information about the selected Ad Exchange account.
@@ -640,6 +641,14 @@
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 *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -654,6 +663,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -703,6 +715,7 @@
type AdclientsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all ad clients in this Ad Exchange account.
@@ -735,6 +748,14 @@
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 *AdclientsListCall) Context(ctx context.Context) *AdclientsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdclientsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -753,6 +774,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -808,6 +832,7 @@
adClientId string
adUnitId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the specified ad unit in the specified ad client.
@@ -826,6 +851,14 @@
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 *AdunitsGetCall) Context(ctx context.Context) *AdunitsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdunitsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -841,6 +874,9 @@
"adUnitId": c.adUnitId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -898,6 +934,7 @@
s *Service
adClientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all ad units in the specified ad client for this Ad
@@ -939,6 +976,14 @@
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 *AdunitsListCall) Context(ctx context.Context) *AdunitsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdunitsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -962,6 +1007,9 @@
"adClientId": c.adClientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1031,6 +1079,7 @@
adClientId string
adUnitId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all custom channels which the specified ad unit belongs
@@ -1067,6 +1116,14 @@
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 *AdunitsCustomchannelsListCall) Context(ctx context.Context) *AdunitsCustomchannelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdunitsCustomchannelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1088,6 +1145,9 @@
"adUnitId": c.adUnitId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1157,6 +1217,7 @@
type AlertsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List the alerts for this Ad Exchange account.
@@ -1182,6 +1243,14 @@
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 *AlertsListCall) Context(ctx context.Context) *AlertsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AlertsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1197,6 +1266,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1244,6 +1316,7 @@
adClientId string
customChannelId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get the specified custom channel from the specified ad client.
@@ -1262,6 +1335,14 @@
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 *CustomchannelsGetCall) Context(ctx context.Context) *CustomchannelsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CustomchannelsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1277,6 +1358,9 @@
"customChannelId": c.customChannelId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1334,6 +1418,7 @@
s *Service
adClientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all custom channels in the specified ad client for this Ad
@@ -1369,6 +1454,14 @@
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 *CustomchannelsListCall) Context(ctx context.Context) *CustomchannelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CustomchannelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1389,6 +1482,9 @@
"adClientId": c.adClientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1453,6 +1549,7 @@
adClientId string
customChannelId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all ad units in the specified custom channel.
@@ -1494,6 +1591,14 @@
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 *CustomchannelsAdunitsListCall) Context(ctx context.Context) *CustomchannelsAdunitsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CustomchannelsAdunitsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1518,6 +1623,9 @@
"customChannelId": c.customChannelId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1592,6 +1700,7 @@
type MetadataDimensionsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List the metadata for the dimensions available to this
@@ -1609,6 +1718,14 @@
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 *MetadataDimensionsListCall) Context(ctx context.Context) *MetadataDimensionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MetadataDimensionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1621,6 +1738,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1659,6 +1779,7 @@
type MetadataMetricsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List the metadata for the metrics available to this AdExchange
@@ -1676,6 +1797,14 @@
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 *MetadataMetricsListCall) Context(ctx context.Context) *MetadataMetricsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MetadataMetricsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1688,6 +1817,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1727,6 +1859,7 @@
s *Service
dealId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get information about the selected Ad Exchange Preferred Deal.
@@ -1744,6 +1877,14 @@
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 *PreferreddealsGetCall) Context(ctx context.Context) *PreferreddealsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PreferreddealsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1758,6 +1899,9 @@
"dealId": c.dealId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1807,6 +1951,7 @@
type PreferreddealsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List the preferred deals for this Ad Exchange account.
@@ -1823,6 +1968,14 @@
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 *PreferreddealsListCall) Context(ctx context.Context) *PreferreddealsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PreferreddealsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1835,6 +1988,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1875,6 +2031,7 @@
startDate string
endDate string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Generate: Generate an Ad Exchange report based on the report request
@@ -1947,6 +2104,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *ReportsGenerateCall) Context(ctx context.Context) *ReportsGenerateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsGenerateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1982,6 +2147,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2107,6 +2275,7 @@
s *Service
savedReportId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Generate: Generate an Ad Exchange report based on the saved report ID
@@ -2147,6 +2316,14 @@
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 *ReportsSavedGenerateCall) Context(ctx context.Context) *ReportsSavedGenerateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsSavedGenerateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2170,6 +2347,9 @@
"savedReportId": c.savedReportId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2241,6 +2421,7 @@
type ReportsSavedListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all saved reports in this Ad Exchange account.
@@ -2273,6 +2454,14 @@
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 *ReportsSavedListCall) Context(ctx context.Context) *ReportsSavedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsSavedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2291,6 +2480,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2345,6 +2537,7 @@
s *Service
adClientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all URL channels in the specified ad client for this Ad
@@ -2379,6 +2572,14 @@
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 *UrlchannelsListCall) Context(ctx context.Context) *UrlchannelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UrlchannelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2399,6 +2600,9 @@
"adClientId": c.adClientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/adexchangeseller/v1/adexchangeseller-gen.go b/adexchangeseller/v1/adexchangeseller-gen.go
index 48010b7..0603370 100644
--- a/adexchangeseller/v1/adexchangeseller-gen.go
+++ b/adexchangeseller/v1/adexchangeseller-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "adexchangeseller:v1"
const apiName = "adexchangeseller"
@@ -419,6 +419,7 @@
type AdclientsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all ad clients in this Ad Exchange account.
@@ -451,6 +452,14 @@
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 *AdclientsListCall) Context(ctx context.Context) *AdclientsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdclientsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -469,6 +478,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -524,6 +536,7 @@
adClientId string
adUnitId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the specified ad unit in the specified ad client.
@@ -542,6 +555,14 @@
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 *AdunitsGetCall) Context(ctx context.Context) *AdunitsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdunitsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -557,6 +578,9 @@
"adUnitId": c.adUnitId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -614,6 +638,7 @@
s *Service
adClientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all ad units in the specified ad client for this Ad
@@ -655,6 +680,14 @@
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 *AdunitsListCall) Context(ctx context.Context) *AdunitsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdunitsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -678,6 +711,9 @@
"adClientId": c.adClientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -747,6 +783,7 @@
adClientId string
adUnitId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all custom channels which the specified ad unit belongs
@@ -783,6 +820,14 @@
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 *AdunitsCustomchannelsListCall) Context(ctx context.Context) *AdunitsCustomchannelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdunitsCustomchannelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -804,6 +849,9 @@
"adUnitId": c.adUnitId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -875,6 +923,7 @@
adClientId string
customChannelId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get the specified custom channel from the specified ad client.
@@ -893,6 +942,14 @@
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 *CustomchannelsGetCall) Context(ctx context.Context) *CustomchannelsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CustomchannelsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -908,6 +965,9 @@
"customChannelId": c.customChannelId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -965,6 +1025,7 @@
s *Service
adClientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all custom channels in the specified ad client for this Ad
@@ -1000,6 +1061,14 @@
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 *CustomchannelsListCall) Context(ctx context.Context) *CustomchannelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CustomchannelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1020,6 +1089,9 @@
"adClientId": c.adClientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1084,6 +1156,7 @@
adClientId string
customChannelId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all ad units in the specified custom channel.
@@ -1125,6 +1198,14 @@
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 *CustomchannelsAdunitsListCall) Context(ctx context.Context) *CustomchannelsAdunitsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CustomchannelsAdunitsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1149,6 +1230,9 @@
"customChannelId": c.customChannelId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1225,6 +1309,7 @@
startDate string
endDate string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Generate: Generate an Ad Exchange report based on the report request
@@ -1297,6 +1382,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *ReportsGenerateCall) Context(ctx context.Context) *ReportsGenerateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsGenerateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1332,6 +1425,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1457,6 +1553,7 @@
s *Service
savedReportId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Generate: Generate an Ad Exchange report based on the saved report ID
@@ -1497,6 +1594,14 @@
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 *ReportsSavedGenerateCall) Context(ctx context.Context) *ReportsSavedGenerateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsSavedGenerateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1520,6 +1625,9 @@
"savedReportId": c.savedReportId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1591,6 +1699,7 @@
type ReportsSavedListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all saved reports in this Ad Exchange account.
@@ -1623,6 +1732,14 @@
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 *ReportsSavedListCall) Context(ctx context.Context) *ReportsSavedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsSavedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1641,6 +1758,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1695,6 +1815,7 @@
s *Service
adClientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all URL channels in the specified ad client for this Ad
@@ -1729,6 +1850,14 @@
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 *UrlchannelsListCall) Context(ctx context.Context) *UrlchannelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UrlchannelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1749,6 +1878,9 @@
"adClientId": c.adClientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/adexchangeseller/v2.0/adexchangeseller-gen.go b/adexchangeseller/v2.0/adexchangeseller-gen.go
index 86a956c..4944c7d 100644
--- a/adexchangeseller/v2.0/adexchangeseller-gen.go
+++ b/adexchangeseller/v2.0/adexchangeseller-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "adexchangeseller:v2.0"
const apiName = "adexchangeseller"
@@ -559,6 +559,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get information about the selected Ad Exchange account.
@@ -576,6 +577,14 @@
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 *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -590,6 +599,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -639,6 +651,7 @@
type AccountsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all accounts available to this Ad Exchange account.
@@ -671,6 +684,14 @@
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 *AccountsListCall) Context(ctx context.Context) *AccountsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -689,6 +710,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -743,6 +767,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all ad clients in this Ad Exchange account.
@@ -776,6 +801,14 @@
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 *AccountsAdclientsListCall) Context(ctx context.Context) *AccountsAdclientsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsAdclientsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -796,6 +829,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -859,6 +895,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List the alerts for this Ad Exchange account.
@@ -885,6 +922,14 @@
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 *AccountsAlertsListCall) Context(ctx context.Context) *AccountsAlertsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsAlertsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -902,6 +947,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -959,6 +1007,7 @@
adClientId string
customChannelId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get the specified custom channel from the specified ad client.
@@ -978,6 +1027,14 @@
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 *AccountsCustomchannelsGetCall) Context(ctx context.Context) *AccountsCustomchannelsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsCustomchannelsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -994,6 +1051,9 @@
"customChannelId": c.customChannelId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1059,6 +1119,7 @@
accountId string
adClientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all custom channels in the specified ad client for this Ad
@@ -1095,6 +1156,14 @@
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 *AccountsCustomchannelsListCall) Context(ctx context.Context) *AccountsCustomchannelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsCustomchannelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1116,6 +1185,9 @@
"adClientId": c.adClientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1186,6 +1258,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List the metadata for the dimensions available to this
@@ -1204,6 +1277,14 @@
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 *AccountsMetadataDimensionsListCall) Context(ctx context.Context) *AccountsMetadataDimensionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsMetadataDimensionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1218,6 +1299,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1268,6 +1352,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List the metadata for the metrics available to this AdExchange
@@ -1286,6 +1371,14 @@
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 *AccountsMetadataMetricsListCall) Context(ctx context.Context) *AccountsMetadataMetricsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsMetadataMetricsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1300,6 +1393,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1351,6 +1447,7 @@
accountId string
dealId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get information about the selected Ad Exchange Preferred Deal.
@@ -1369,6 +1466,14 @@
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 *AccountsPreferreddealsGetCall) Context(ctx context.Context) *AccountsPreferreddealsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsPreferreddealsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1384,6 +1489,9 @@
"dealId": c.dealId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1441,6 +1549,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List the preferred deals for this Ad Exchange account.
@@ -1458,6 +1567,14 @@
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 *AccountsPreferreddealsListCall) Context(ctx context.Context) *AccountsPreferreddealsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsPreferreddealsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1472,6 +1589,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1524,6 +1644,7 @@
startDate string
endDate string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Generate: Generate an Ad Exchange report based on the report request
@@ -1597,6 +1718,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *AccountsReportsGenerateCall) Context(ctx context.Context) *AccountsReportsGenerateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsReportsGenerateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1634,6 +1763,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1767,6 +1899,7 @@
accountId string
savedReportId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Generate: Generate an Ad Exchange report based on the saved report ID
@@ -1808,6 +1941,14 @@
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 *AccountsReportsSavedGenerateCall) Context(ctx context.Context) *AccountsReportsSavedGenerateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsReportsSavedGenerateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1832,6 +1973,9 @@
"savedReportId": c.savedReportId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1911,6 +2055,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all saved reports in this Ad Exchange account.
@@ -1944,6 +2089,14 @@
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 *AccountsReportsSavedListCall) Context(ctx context.Context) *AccountsReportsSavedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsReportsSavedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1964,6 +2117,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2028,6 +2184,7 @@
accountId string
adClientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all URL channels in the specified ad client for this Ad
@@ -2063,6 +2220,14 @@
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 *AccountsUrlchannelsListCall) Context(ctx context.Context) *AccountsUrlchannelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsUrlchannelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2084,6 +2249,9 @@
"adClientId": c.adClientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/admin/datatransfer/v1/admin-gen.go b/admin/datatransfer/v1/admin-gen.go
index 44850b4..40923fc 100644
--- a/admin/datatransfer/v1/admin-gen.go
+++ b/admin/datatransfer/v1/admin-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "admin:datatransfer_v1"
const apiName = "admin"
@@ -215,6 +215,7 @@
s *Service
applicationId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves information about an application for the given
@@ -233,6 +234,14 @@
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 *ApplicationsGetCall) Context(ctx context.Context) *ApplicationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ApplicationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -247,6 +256,9 @@
"applicationId": strconv.FormatInt(c.applicationId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -297,6 +309,7 @@
type ApplicationsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the applications available for data transfer for a
@@ -335,6 +348,14 @@
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 *ApplicationsListCall) Context(ctx context.Context) *ApplicationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ApplicationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -356,6 +377,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -415,6 +439,7 @@
s *Service
dataTransferId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a data transfer request by its resource ID.
@@ -432,6 +457,14 @@
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 *TransfersGetCall) Context(ctx context.Context) *TransfersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TransfersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -446,6 +479,9 @@
"dataTransferId": c.dataTransferId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -496,6 +532,7 @@
s *Service
datatransfer *DataTransfer
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a data transfer request.
@@ -513,6 +550,14 @@
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 *TransfersInsertCall) Context(ctx context.Context) *TransfersInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TransfersInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.datatransfer)
@@ -531,6 +576,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -571,6 +619,7 @@
type TransfersListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the transfers for a customer by source user, destination
@@ -629,6 +678,14 @@
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 *TransfersListCall) Context(ctx context.Context) *TransfersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TransfersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -659,6 +716,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/admin/directory/v1/admin-gen.go b/admin/directory/v1/admin-gen.go
index 23d095e..8933e4a 100644
--- a/admin/directory/v1/admin-gen.go
+++ b/admin/directory/v1/admin-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "admin:directory_v1"
const apiName = "admin"
@@ -1422,6 +1422,7 @@
userKey string
codeId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete an ASP issued by a user.
@@ -1440,6 +1441,14 @@
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 *AspsDeleteCall) Context(ctx context.Context) *AspsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AspsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1455,6 +1464,9 @@
"codeId": strconv.FormatInt(c.codeId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1506,6 +1518,7 @@
userKey string
codeId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get information about an ASP issued by a user.
@@ -1524,6 +1537,14 @@
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 *AspsGetCall) Context(ctx context.Context) *AspsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AspsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1539,6 +1560,9 @@
"codeId": strconv.FormatInt(c.codeId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1596,6 +1620,7 @@
s *Service
userKey string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List the ASPs issued by a user.
@@ -1613,6 +1638,14 @@
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 *AspsListCall) Context(ctx context.Context) *AspsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AspsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1627,6 +1660,9 @@
"userKey": c.userKey,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1676,6 +1712,7 @@
s *Service
channel *Channel
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Stop: Stop watching resources through this channel
@@ -1693,6 +1730,14 @@
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 *ChannelsStopCall) Context(ctx context.Context) *ChannelsStopCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChannelsStopCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
@@ -1711,6 +1756,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1750,6 +1798,7 @@
customerId string
deviceId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieve Chrome OS Device
@@ -1780,6 +1829,14 @@
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 *ChromeosdevicesGetCall) Context(ctx context.Context) *ChromeosdevicesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChromeosdevicesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1798,6 +1855,9 @@
"deviceId": c.deviceId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1868,6 +1928,7 @@
s *Service
customerId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieve all Chrome OS Devices of a customer (paginated)
@@ -1948,6 +2009,14 @@
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 *ChromeosdevicesListCall) Context(ctx context.Context) *ChromeosdevicesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChromeosdevicesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1980,6 +2049,9 @@
"customerId": c.customerId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2098,6 +2170,7 @@
deviceId string
chromeosdevice *ChromeOsDevice
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Update Chrome OS Device. This method supports patch semantics.
@@ -2129,6 +2202,14 @@
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 *ChromeosdevicesPatchCall) Context(ctx context.Context) *ChromeosdevicesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChromeosdevicesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.chromeosdevice)
@@ -2153,6 +2234,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2227,6 +2311,7 @@
deviceId string
chromeosdevice *ChromeOsDevice
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Update Chrome OS Device
@@ -2258,6 +2343,14 @@
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 *ChromeosdevicesUpdateCall) Context(ctx context.Context) *ChromeosdevicesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChromeosdevicesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.chromeosdevice)
@@ -2282,6 +2375,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2354,6 +2450,7 @@
s *Service
groupKey string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete Group
@@ -2371,6 +2468,14 @@
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 *GroupsDeleteCall) Context(ctx context.Context) *GroupsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2385,6 +2490,9 @@
"groupKey": c.groupKey,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2427,6 +2535,7 @@
s *Service
groupKey string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieve Group
@@ -2444,6 +2553,14 @@
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 *GroupsGetCall) Context(ctx context.Context) *GroupsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2458,6 +2575,9 @@
"groupKey": c.groupKey,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2508,6 +2628,7 @@
s *Service
group *Group
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Create Group
@@ -2525,6 +2646,14 @@
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 *GroupsInsertCall) Context(ctx context.Context) *GroupsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
@@ -2543,6 +2672,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2583,6 +2715,7 @@
type GroupsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieve all groups in a domain (paginated)
@@ -2637,6 +2770,14 @@
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 *GroupsListCall) Context(ctx context.Context) *GroupsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2664,6 +2805,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2733,6 +2877,7 @@
groupKey string
group *Group
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Update Group. This method supports patch semantics.
@@ -2751,6 +2896,14 @@
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 *GroupsPatchCall) Context(ctx context.Context) *GroupsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
@@ -2771,6 +2924,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2824,6 +2980,7 @@
groupKey string
group *Group
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Update Group
@@ -2842,6 +2999,14 @@
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 *GroupsUpdateCall) Context(ctx context.Context) *GroupsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
@@ -2862,6 +3027,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2915,6 +3083,7 @@
groupKey string
alias string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Remove a alias for the group
@@ -2933,6 +3102,14 @@
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 *GroupsAliasesDeleteCall) Context(ctx context.Context) *GroupsAliasesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsAliasesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2948,6 +3125,9 @@
"alias": c.alias,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2998,6 +3178,7 @@
groupKey string
alias *Alias
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Add a alias for the group
@@ -3016,6 +3197,14 @@
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 *GroupsAliasesInsertCall) Context(ctx context.Context) *GroupsAliasesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsAliasesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.alias)
@@ -3036,6 +3225,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3088,6 +3280,7 @@
s *Service
groupKey string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all aliases for a group
@@ -3105,6 +3298,14 @@
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 *GroupsAliasesListCall) Context(ctx context.Context) *GroupsAliasesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsAliasesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3119,6 +3320,9 @@
"groupKey": c.groupKey,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3171,6 +3375,7 @@
groupKey string
memberKey string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Remove membership.
@@ -3189,6 +3394,14 @@
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 *MembersDeleteCall) Context(ctx context.Context) *MembersDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MembersDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3204,6 +3417,9 @@
"memberKey": c.memberKey,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3255,6 +3471,7 @@
groupKey string
memberKey string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieve Group Member
@@ -3273,6 +3490,14 @@
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 *MembersGetCall) Context(ctx context.Context) *MembersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MembersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3288,6 +3513,9 @@
"memberKey": c.memberKey,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3348,6 +3576,7 @@
groupKey string
member *Member
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Add user to the specified group.
@@ -3366,6 +3595,14 @@
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 *MembersInsertCall) Context(ctx context.Context) *MembersInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MembersInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.member)
@@ -3386,6 +3623,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3439,6 +3679,7 @@
s *Service
groupKey string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieve all members in a group (paginated)
@@ -3477,6 +3718,14 @@
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 *MembersListCall) Context(ctx context.Context) *MembersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MembersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3500,6 +3749,9 @@
"groupKey": c.groupKey,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3571,6 +3823,7 @@
memberKey string
member *Member
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Update membership of a user in the specified group. This
@@ -3591,6 +3844,14 @@
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 *MembersPatchCall) Context(ctx context.Context) *MembersPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MembersPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.member)
@@ -3612,6 +3873,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3674,6 +3938,7 @@
memberKey string
member *Member
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Update membership of a user in the specified group.
@@ -3693,6 +3958,14 @@
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 *MembersUpdateCall) Context(ctx context.Context) *MembersUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MembersUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.member)
@@ -3714,6 +3987,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3776,6 +4052,7 @@
resourceId string
mobiledeviceaction *MobileDeviceAction
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Action: Take action on Mobile Device
@@ -3795,6 +4072,14 @@
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 *MobiledevicesActionCall) Context(ctx context.Context) *MobiledevicesActionCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MobiledevicesActionCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.mobiledeviceaction)
@@ -3816,6 +4101,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3870,6 +4158,7 @@
customerId string
resourceId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete Mobile Device
@@ -3888,6 +4177,14 @@
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 *MobiledevicesDeleteCall) Context(ctx context.Context) *MobiledevicesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MobiledevicesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3903,6 +4200,9 @@
"resourceId": c.resourceId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3953,6 +4253,7 @@
customerId string
resourceId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieve Mobile Device
@@ -3983,6 +4284,14 @@
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 *MobiledevicesGetCall) Context(ctx context.Context) *MobiledevicesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MobiledevicesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4001,6 +4310,9 @@
"resourceId": c.resourceId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4072,6 +4384,7 @@
s *Service
customerId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieve all Mobile Devices of a customer (paginated)
@@ -4152,6 +4465,14 @@
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 *MobiledevicesListCall) Context(ctx context.Context) *MobiledevicesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MobiledevicesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4184,6 +4505,9 @@
"customerId": c.customerId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4304,6 +4628,7 @@
customer string
notificationId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a notification
@@ -4322,6 +4647,14 @@
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 *NotificationsDeleteCall) Context(ctx context.Context) *NotificationsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *NotificationsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4337,6 +4670,9 @@
"notificationId": c.notificationId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4387,6 +4723,7 @@
customer string
notificationId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a notification.
@@ -4405,6 +4742,14 @@
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 *NotificationsGetCall) Context(ctx context.Context) *NotificationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *NotificationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4420,6 +4765,9 @@
"notificationId": c.notificationId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4476,6 +4824,7 @@
s *Service
customer string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of notifications.
@@ -4515,6 +4864,14 @@
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 *NotificationsListCall) Context(ctx context.Context) *NotificationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *NotificationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4538,6 +4895,9 @@
"customer": c.customer,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4605,6 +4965,7 @@
notificationId string
notification *Notification
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a notification. This method supports patch semantics.
@@ -4624,6 +4985,14 @@
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 *NotificationsPatchCall) Context(ctx context.Context) *NotificationsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *NotificationsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.notification)
@@ -4645,6 +5014,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4706,6 +5078,7 @@
notificationId string
notification *Notification
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a notification.
@@ -4725,6 +5098,14 @@
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 *NotificationsUpdateCall) Context(ctx context.Context) *NotificationsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *NotificationsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.notification)
@@ -4746,6 +5127,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4806,6 +5190,7 @@
customerId string
orgUnitPath []string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Remove Organization Unit
@@ -4824,6 +5209,14 @@
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 *OrgunitsDeleteCall) Context(ctx context.Context) *OrgunitsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrgunitsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4839,6 +5232,9 @@
"orgUnitPath": c.orgUnitPath[0],
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4890,6 +5286,7 @@
customerId string
orgUnitPath []string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieve Organization Unit
@@ -4908,6 +5305,14 @@
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 *OrgunitsGetCall) Context(ctx context.Context) *OrgunitsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrgunitsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4923,6 +5328,9 @@
"orgUnitPath": c.orgUnitPath[0],
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4982,6 +5390,7 @@
customerId string
orgunit *OrgUnit
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Add Organization Unit
@@ -5000,6 +5409,14 @@
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 *OrgunitsInsertCall) Context(ctx context.Context) *OrgunitsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrgunitsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.orgunit)
@@ -5020,6 +5437,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5072,6 +5492,7 @@
s *Service
customerId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieve all Organization Units
@@ -5107,6 +5528,14 @@
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 *OrgunitsListCall) Context(ctx context.Context) *OrgunitsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrgunitsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5127,6 +5556,9 @@
"customerId": c.customerId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5198,6 +5630,7 @@
orgUnitPath []string
orgunit *OrgUnit
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Update Organization Unit. This method supports patch
@@ -5218,6 +5651,14 @@
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 *OrgunitsPatchCall) Context(ctx context.Context) *OrgunitsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrgunitsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.orgunit)
@@ -5239,6 +5680,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5301,6 +5745,7 @@
orgUnitPath []string
orgunit *OrgUnit
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Update Organization Unit
@@ -5320,6 +5765,14 @@
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 *OrgunitsUpdateCall) Context(ctx context.Context) *OrgunitsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrgunitsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.orgunit)
@@ -5341,6 +5794,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5402,6 +5858,7 @@
customerId string
schemaKey string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete schema
@@ -5420,6 +5877,14 @@
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 *SchemasDeleteCall) Context(ctx context.Context) *SchemasDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SchemasDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5435,6 +5900,9 @@
"schemaKey": c.schemaKey,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5485,6 +5953,7 @@
customerId string
schemaKey string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieve schema
@@ -5503,6 +5972,14 @@
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 *SchemasGetCall) Context(ctx context.Context) *SchemasGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SchemasGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5518,6 +5995,9 @@
"schemaKey": c.schemaKey,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5576,6 +6056,7 @@
customerId string
schema *Schema
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Create schema.
@@ -5594,6 +6075,14 @@
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 *SchemasInsertCall) Context(ctx context.Context) *SchemasInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SchemasInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.schema)
@@ -5614,6 +6103,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5666,6 +6158,7 @@
s *Service
customerId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieve all schemas for a customer
@@ -5683,6 +6176,14 @@
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 *SchemasListCall) Context(ctx context.Context) *SchemasListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SchemasListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5697,6 +6198,9 @@
"customerId": c.customerId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5749,6 +6253,7 @@
schemaKey string
schema *Schema
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Update schema. This method supports patch semantics.
@@ -5768,6 +6273,14 @@
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 *SchemasPatchCall) Context(ctx context.Context) *SchemasPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SchemasPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.schema)
@@ -5789,6 +6302,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5850,6 +6366,7 @@
schemaKey string
schema *Schema
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Update schema
@@ -5869,6 +6386,14 @@
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 *SchemasUpdateCall) Context(ctx context.Context) *SchemasUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SchemasUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.schema)
@@ -5890,6 +6415,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5950,6 +6478,7 @@
userKey string
clientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete all access tokens issued by a user for an application.
@@ -5968,6 +6497,14 @@
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 *TokensDeleteCall) Context(ctx context.Context) *TokensDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TokensDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5983,6 +6520,9 @@
"clientId": c.clientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6033,6 +6573,7 @@
userKey string
clientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get information about an access token issued by a user.
@@ -6051,6 +6592,14 @@
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 *TokensGetCall) Context(ctx context.Context) *TokensGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TokensGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6066,6 +6615,9 @@
"clientId": c.clientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6122,6 +6674,7 @@
s *Service
userKey string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns the set of tokens specified user has issued to 3rd
@@ -6140,6 +6693,14 @@
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 *TokensListCall) Context(ctx context.Context) *TokensListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TokensListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6154,6 +6715,9 @@
"userKey": c.userKey,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6203,6 +6767,7 @@
s *Service
userKey string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete user
@@ -6220,6 +6785,14 @@
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 *UsersDeleteCall) Context(ctx context.Context) *UsersDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6234,6 +6807,9 @@
"userKey": c.userKey,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6276,6 +6852,7 @@
s *Service
userKey string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: retrieve user
@@ -6325,6 +6902,14 @@
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 *UsersGetCall) Context(ctx context.Context) *UsersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6348,6 +6933,9 @@
"userKey": c.userKey,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6433,6 +7021,7 @@
s *Service
user *User
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: create user.
@@ -6450,6 +7039,14 @@
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 *UsersInsertCall) Context(ctx context.Context) *UsersInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
@@ -6468,6 +7065,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6508,6 +7108,7 @@
type UsersListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieve either deleted users or all users in a domain
@@ -6639,6 +7240,14 @@
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 *UsersListCall) Context(ctx context.Context) *UsersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6687,6 +7296,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6845,6 +7457,7 @@
userKey string
usermakeadmin *UserMakeAdmin
opt_ map[string]interface{}
+ ctx_ context.Context
}
// MakeAdmin: change admin status of a user
@@ -6863,6 +7476,14 @@
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 *UsersMakeAdminCall) Context(ctx context.Context) *UsersMakeAdminCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersMakeAdminCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.usermakeadmin)
@@ -6883,6 +7504,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6929,6 +7553,7 @@
userKey string
user *User
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: update user. This method supports patch semantics.
@@ -6947,6 +7572,14 @@
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 *UsersPatchCall) Context(ctx context.Context) *UsersPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
@@ -6967,6 +7600,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7020,6 +7656,7 @@
userKey string
userundelete *UserUndelete
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Undelete: Undelete a deleted user
@@ -7038,6 +7675,14 @@
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 *UsersUndeleteCall) Context(ctx context.Context) *UsersUndeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersUndeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.userundelete)
@@ -7058,6 +7703,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7104,6 +7752,7 @@
userKey string
user *User
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: update user
@@ -7122,6 +7771,14 @@
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 *UsersUpdateCall) Context(ctx context.Context) *UsersUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
@@ -7142,6 +7799,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7194,6 +7854,7 @@
s *Service
channel *Channel
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Watch: Watch for changes in users list
@@ -7325,6 +7986,14 @@
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 *UsersWatchCall) Context(ctx context.Context) *UsersWatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersWatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
@@ -7379,6 +8048,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7541,6 +8213,7 @@
userKey string
alias string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Remove a alias for the user
@@ -7559,6 +8232,14 @@
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 *UsersAliasesDeleteCall) Context(ctx context.Context) *UsersAliasesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersAliasesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7574,6 +8255,9 @@
"alias": c.alias,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7625,6 +8309,7 @@
userKey string
alias *Alias
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Add a alias for the user
@@ -7643,6 +8328,14 @@
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 *UsersAliasesInsertCall) Context(ctx context.Context) *UsersAliasesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersAliasesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.alias)
@@ -7663,6 +8356,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7716,6 +8412,7 @@
s *Service
userKey string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all aliases for a user
@@ -7744,6 +8441,14 @@
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 *UsersAliasesListCall) Context(ctx context.Context) *UsersAliasesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersAliasesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7761,6 +8466,9 @@
"userKey": c.userKey,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7828,6 +8536,7 @@
userKey string
channel *Channel
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Watch: Watch for changes in user aliases list
@@ -7857,6 +8566,14 @@
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 *UsersAliasesWatchCall) Context(ctx context.Context) *UsersAliasesWatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersAliasesWatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
@@ -7880,6 +8597,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7950,6 +8670,7 @@
s *Service
userKey string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Remove photos for the user
@@ -7967,6 +8688,14 @@
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 *UsersPhotosDeleteCall) Context(ctx context.Context) *UsersPhotosDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersPhotosDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7981,6 +8710,9 @@
"userKey": c.userKey,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8023,6 +8755,7 @@
s *Service
userKey string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieve photo of a user
@@ -8040,6 +8773,14 @@
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 *UsersPhotosGetCall) Context(ctx context.Context) *UsersPhotosGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersPhotosGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8054,6 +8795,9 @@
"userKey": c.userKey,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8105,6 +8849,7 @@
userKey string
userphoto *UserPhoto
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Add a photo for the user. This method supports patch
@@ -8124,6 +8869,14 @@
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 *UsersPhotosPatchCall) Context(ctx context.Context) *UsersPhotosPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersPhotosPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.userphoto)
@@ -8144,6 +8897,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8197,6 +8953,7 @@
userKey string
userphoto *UserPhoto
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Add a photo for the user
@@ -8215,6 +8972,14 @@
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 *UsersPhotosUpdateCall) Context(ctx context.Context) *UsersPhotosUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersPhotosUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.userphoto)
@@ -8235,6 +9000,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8287,6 +9055,7 @@
s *Service
userKey string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Generate: Generate new backup verification codes for the user.
@@ -8304,6 +9073,14 @@
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 *VerificationCodesGenerateCall) Context(ctx context.Context) *VerificationCodesGenerateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VerificationCodesGenerateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8318,6 +9095,9 @@
"userKey": c.userKey,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8360,6 +9140,7 @@
s *Service
userKey string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Invalidate: Invalidate the current backup verification codes for the
@@ -8378,6 +9159,14 @@
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 *VerificationCodesInvalidateCall) Context(ctx context.Context) *VerificationCodesInvalidateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VerificationCodesInvalidateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8392,6 +9181,9 @@
"userKey": c.userKey,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8434,6 +9226,7 @@
s *Service
userKey string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns the current set of valid backup verification codes for
@@ -8452,6 +9245,14 @@
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 *VerificationCodesListCall) Context(ctx context.Context) *VerificationCodesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VerificationCodesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8466,6 +9267,9 @@
"userKey": c.userKey,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/admin/email_migration/v2/admin-gen.go b/admin/email_migration/v2/admin-gen.go
index 70220e0..2d8928c 100644
--- a/admin/email_migration/v2/admin-gen.go
+++ b/admin/email_migration/v2/admin-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "admin:email_migration_v2"
const apiName = "admin"
@@ -120,8 +120,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Insert: Insert Mail into Google's Gmail backends
@@ -140,10 +140,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *MailInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *MailInsertCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -168,6 +170,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *MailInsertCall) Context(ctx context.Context) *MailInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MailInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.mailitem)
@@ -207,6 +219,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/admin/reports/v1/admin-gen.go b/admin/reports/v1/admin-gen.go
index ee56764..96d4d32 100644
--- a/admin/reports/v1/admin-gen.go
+++ b/admin/reports/v1/admin-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "admin:reports_v1"
const apiName = "admin"
@@ -361,6 +361,7 @@
userKey string
applicationName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of activities for a specific customer and
@@ -438,6 +439,14 @@
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 *ActivitiesListCall) Context(ctx context.Context) *ActivitiesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ActivitiesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -477,6 +486,9 @@
"applicationName": c.applicationName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -584,6 +596,7 @@
applicationName string
channel *Channel
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Watch: Push changes to activities
@@ -661,6 +674,14 @@
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 *ActivitiesWatchCall) Context(ctx context.Context) *ActivitiesWatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ActivitiesWatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
@@ -706,6 +727,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -815,6 +839,7 @@
s *Service
channel *Channel
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Stop: Stop watching resources through this channel
@@ -832,6 +857,14 @@
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 *ChannelsStopCall) Context(ctx context.Context) *ChannelsStopCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChannelsStopCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
@@ -850,6 +883,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -885,6 +921,7 @@
s *Service
date string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a report which is a collection of properties /
@@ -925,6 +962,14 @@
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 *CustomerUsageReportsGetCall) Context(ctx context.Context) *CustomerUsageReportsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CustomerUsageReportsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -948,6 +993,9 @@
"date": c.date,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1016,6 +1064,7 @@
userKey string
date string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a report which is a collection of properties /
@@ -1071,6 +1120,14 @@
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 *UserUsageReportGetCall) Context(ctx context.Context) *UserUsageReportGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserUsageReportGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1101,6 +1158,9 @@
"date": c.date,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/adsense/v1.2/adsense-gen.go b/adsense/v1.2/adsense-gen.go
index 6a95667..a1e8cb7 100644
--- a/adsense/v1.2/adsense-gen.go
+++ b/adsense/v1.2/adsense-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "adsense:v1.2"
const apiName = "adsense"
@@ -734,6 +734,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get information about the selected AdSense account.
@@ -758,6 +759,14 @@
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 *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -775,6 +784,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -829,6 +841,7 @@
type AccountsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all accounts available to this AdSense account.
@@ -861,6 +874,14 @@
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 *AccountsListCall) Context(ctx context.Context) *AccountsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -879,6 +900,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -933,6 +957,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all ad clients in the specified account.
@@ -966,6 +991,14 @@
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 *AccountsAdclientsListCall) Context(ctx context.Context) *AccountsAdclientsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsAdclientsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -986,6 +1019,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1051,6 +1087,7 @@
adClientId string
adUnitId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the specified ad unit in the specified ad client for the
@@ -1071,6 +1108,14 @@
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 *AccountsAdunitsGetCall) Context(ctx context.Context) *AccountsAdunitsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsAdunitsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1087,6 +1132,9 @@
"adUnitId": c.adUnitId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1152,6 +1200,7 @@
accountId string
adClientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all ad units in the specified ad client for the specified
@@ -1194,6 +1243,14 @@
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 *AccountsAdunitsListCall) Context(ctx context.Context) *AccountsAdunitsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsAdunitsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1218,6 +1275,9 @@
"adClientId": c.adClientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1295,6 +1355,7 @@
adClientId string
adUnitId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all custom channels which the specified ad unit belongs
@@ -1332,6 +1393,14 @@
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 *AccountsAdunitsCustomchannelsListCall) Context(ctx context.Context) *AccountsAdunitsCustomchannelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsAdunitsCustomchannelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1354,6 +1423,9 @@
"adUnitId": c.adUnitId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1433,6 +1505,7 @@
adClientId string
customChannelId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get the specified custom channel from the specified ad client
@@ -1453,6 +1526,14 @@
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 *AccountsCustomchannelsGetCall) Context(ctx context.Context) *AccountsCustomchannelsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsCustomchannelsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1469,6 +1550,9 @@
"customChannelId": c.customChannelId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1534,6 +1618,7 @@
accountId string
adClientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all custom channels in the specified ad client for the
@@ -1570,6 +1655,14 @@
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 *AccountsCustomchannelsListCall) Context(ctx context.Context) *AccountsCustomchannelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsCustomchannelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1591,6 +1684,9 @@
"adClientId": c.adClientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1663,6 +1759,7 @@
adClientId string
customChannelId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all ad units in the specified custom channel.
@@ -1705,6 +1802,14 @@
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 *AccountsCustomchannelsAdunitsListCall) Context(ctx context.Context) *AccountsCustomchannelsAdunitsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsCustomchannelsAdunitsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1730,6 +1835,9 @@
"customChannelId": c.customChannelId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1814,6 +1922,7 @@
startDate string
endDate string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Generate: Generate an AdSense report based on the report request sent
@@ -1895,6 +2004,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *AccountsReportsGenerateCall) Context(ctx context.Context) *AccountsReportsGenerateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsReportsGenerateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1935,6 +2052,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2074,6 +2194,7 @@
accountId string
savedReportId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Generate: Generate an AdSense report based on the saved report ID
@@ -2115,6 +2236,14 @@
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 *AccountsReportsSavedGenerateCall) Context(ctx context.Context) *AccountsReportsSavedGenerateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsReportsSavedGenerateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2139,6 +2268,9 @@
"savedReportId": c.savedReportId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2218,6 +2350,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all saved reports in the specified AdSense account.
@@ -2251,6 +2384,14 @@
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 *AccountsReportsSavedListCall) Context(ctx context.Context) *AccountsReportsSavedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsReportsSavedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2271,6 +2412,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2335,6 +2479,7 @@
accountId string
savedAdStyleId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: List a specific saved ad style for the specified account.
@@ -2353,6 +2498,14 @@
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 *AccountsSavedadstylesGetCall) Context(ctx context.Context) *AccountsSavedadstylesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsSavedadstylesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2368,6 +2521,9 @@
"savedAdStyleId": c.savedAdStyleId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2425,6 +2581,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all saved ad styles in the specified account.
@@ -2459,6 +2616,14 @@
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 *AccountsSavedadstylesListCall) Context(ctx context.Context) *AccountsSavedadstylesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsSavedadstylesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2479,6 +2644,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2543,6 +2711,7 @@
accountId string
adClientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all URL channels in the specified ad client for the
@@ -2578,6 +2747,14 @@
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 *AccountsUrlchannelsListCall) Context(ctx context.Context) *AccountsUrlchannelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsUrlchannelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2599,6 +2776,9 @@
"adClientId": c.adClientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2668,6 +2848,7 @@
type AdclientsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all ad clients in this AdSense account.
@@ -2700,6 +2881,14 @@
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 *AdclientsListCall) Context(ctx context.Context) *AdclientsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdclientsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2718,6 +2907,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2773,6 +2965,7 @@
adClientId string
adUnitId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the specified ad unit in the specified ad client.
@@ -2791,6 +2984,14 @@
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 *AdunitsGetCall) Context(ctx context.Context) *AdunitsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdunitsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2806,6 +3007,9 @@
"adUnitId": c.adUnitId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2863,6 +3067,7 @@
s *Service
adClientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all ad units in the specified ad client for this AdSense
@@ -2904,6 +3109,14 @@
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 *AdunitsListCall) Context(ctx context.Context) *AdunitsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdunitsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2927,6 +3140,9 @@
"adClientId": c.adClientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2996,6 +3212,7 @@
adClientId string
adUnitId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all custom channels which the specified ad unit belongs
@@ -3032,6 +3249,14 @@
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 *AdunitsCustomchannelsListCall) Context(ctx context.Context) *AdunitsCustomchannelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdunitsCustomchannelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3053,6 +3278,9 @@
"adUnitId": c.adUnitId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3124,6 +3352,7 @@
adClientId string
customChannelId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get the specified custom channel from the specified ad client.
@@ -3142,6 +3371,14 @@
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 *CustomchannelsGetCall) Context(ctx context.Context) *CustomchannelsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CustomchannelsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3157,6 +3394,9 @@
"customChannelId": c.customChannelId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3214,6 +3454,7 @@
s *Service
adClientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all custom channels in the specified ad client for this
@@ -3249,6 +3490,14 @@
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 *CustomchannelsListCall) Context(ctx context.Context) *CustomchannelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CustomchannelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3269,6 +3518,9 @@
"adClientId": c.adClientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3333,6 +3585,7 @@
adClientId string
customChannelId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all ad units in the specified custom channel.
@@ -3374,6 +3627,14 @@
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 *CustomchannelsAdunitsListCall) Context(ctx context.Context) *CustomchannelsAdunitsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CustomchannelsAdunitsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3398,6 +3659,9 @@
"customChannelId": c.customChannelId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3474,6 +3738,7 @@
startDate string
endDate string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Generate: Generate an AdSense report based on the report request sent
@@ -3561,6 +3826,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *ReportsGenerateCall) Context(ctx context.Context) *ReportsGenerateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsGenerateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3602,6 +3875,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3739,6 +4015,7 @@
s *Service
savedReportId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Generate: Generate an AdSense report based on the saved report ID
@@ -3779,6 +4056,14 @@
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 *ReportsSavedGenerateCall) Context(ctx context.Context) *ReportsSavedGenerateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsSavedGenerateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3802,6 +4087,9 @@
"savedReportId": c.savedReportId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3873,6 +4161,7 @@
type ReportsSavedListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all saved reports in this AdSense account.
@@ -3905,6 +4194,14 @@
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 *ReportsSavedListCall) Context(ctx context.Context) *ReportsSavedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsSavedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3923,6 +4220,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3977,6 +4277,7 @@
s *Service
savedAdStyleId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get a specific saved ad style from the user's account.
@@ -3994,6 +4295,14 @@
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 *SavedadstylesGetCall) Context(ctx context.Context) *SavedadstylesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SavedadstylesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4008,6 +4317,9 @@
"savedAdStyleId": c.savedAdStyleId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4057,6 +4369,7 @@
type SavedadstylesListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all saved ad styles in the user's account.
@@ -4090,6 +4403,14 @@
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 *SavedadstylesListCall) Context(ctx context.Context) *SavedadstylesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SavedadstylesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4108,6 +4429,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4162,6 +4486,7 @@
s *Service
adClientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all URL channels in the specified ad client for this
@@ -4196,6 +4521,14 @@
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 *UrlchannelsListCall) Context(ctx context.Context) *UrlchannelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UrlchannelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4216,6 +4549,9 @@
"adClientId": c.adClientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/adsense/v1.3/adsense-gen.go b/adsense/v1.3/adsense-gen.go
index fe10b81..3bedd04 100644
--- a/adsense/v1.3/adsense-gen.go
+++ b/adsense/v1.3/adsense-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "adsense:v1.3"
const apiName = "adsense"
@@ -877,6 +877,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get information about the selected AdSense account.
@@ -901,6 +902,14 @@
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 *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -918,6 +927,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -972,6 +984,7 @@
type AccountsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all accounts available to this AdSense account.
@@ -1004,6 +1017,14 @@
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 *AccountsListCall) Context(ctx context.Context) *AccountsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1022,6 +1043,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1076,6 +1100,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all ad clients in the specified account.
@@ -1109,6 +1134,14 @@
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 *AccountsAdclientsListCall) Context(ctx context.Context) *AccountsAdclientsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsAdclientsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1129,6 +1162,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1194,6 +1230,7 @@
adClientId string
adUnitId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the specified ad unit in the specified ad client for the
@@ -1214,6 +1251,14 @@
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 *AccountsAdunitsGetCall) Context(ctx context.Context) *AccountsAdunitsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsAdunitsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1230,6 +1275,9 @@
"adUnitId": c.adUnitId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1296,6 +1344,7 @@
adClientId string
adUnitId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetAdCode: Get ad code for the specified ad unit.
@@ -1315,6 +1364,14 @@
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 *AccountsAdunitsGetAdCodeCall) Context(ctx context.Context) *AccountsAdunitsGetAdCodeCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsAdunitsGetAdCodeCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1331,6 +1388,9 @@
"adUnitId": c.adUnitId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1396,6 +1456,7 @@
accountId string
adClientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all ad units in the specified ad client for the specified
@@ -1438,6 +1499,14 @@
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 *AccountsAdunitsListCall) Context(ctx context.Context) *AccountsAdunitsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsAdunitsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1462,6 +1531,9 @@
"adClientId": c.adClientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1539,6 +1611,7 @@
adClientId string
adUnitId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all custom channels which the specified ad unit belongs
@@ -1576,6 +1649,14 @@
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 *AccountsAdunitsCustomchannelsListCall) Context(ctx context.Context) *AccountsAdunitsCustomchannelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsAdunitsCustomchannelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1598,6 +1679,9 @@
"adUnitId": c.adUnitId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1675,6 +1759,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List the alerts for the specified AdSense account.
@@ -1701,6 +1786,14 @@
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 *AccountsAlertsListCall) Context(ctx context.Context) *AccountsAlertsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsAlertsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1718,6 +1811,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1775,6 +1871,7 @@
adClientId string
customChannelId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get the specified custom channel from the specified ad client
@@ -1795,6 +1892,14 @@
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 *AccountsCustomchannelsGetCall) Context(ctx context.Context) *AccountsCustomchannelsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsCustomchannelsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1811,6 +1916,9 @@
"customChannelId": c.customChannelId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1876,6 +1984,7 @@
accountId string
adClientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all custom channels in the specified ad client for the
@@ -1912,6 +2021,14 @@
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 *AccountsCustomchannelsListCall) Context(ctx context.Context) *AccountsCustomchannelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsCustomchannelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1933,6 +2050,9 @@
"adClientId": c.adClientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2005,6 +2125,7 @@
adClientId string
customChannelId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all ad units in the specified custom channel.
@@ -2047,6 +2168,14 @@
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 *AccountsCustomchannelsAdunitsListCall) Context(ctx context.Context) *AccountsCustomchannelsAdunitsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsCustomchannelsAdunitsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2072,6 +2201,9 @@
"customChannelId": c.customChannelId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2156,6 +2288,7 @@
startDate string
endDate string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Generate: Generate an AdSense report based on the report request sent
@@ -2246,6 +2379,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *AccountsReportsGenerateCall) Context(ctx context.Context) *AccountsReportsGenerateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsReportsGenerateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2289,6 +2430,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2433,6 +2577,7 @@
accountId string
savedReportId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Generate: Generate an AdSense report based on the saved report ID
@@ -2474,6 +2619,14 @@
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 *AccountsReportsSavedGenerateCall) Context(ctx context.Context) *AccountsReportsSavedGenerateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsReportsSavedGenerateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2498,6 +2651,9 @@
"savedReportId": c.savedReportId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2577,6 +2733,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all saved reports in the specified AdSense account.
@@ -2610,6 +2767,14 @@
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 *AccountsReportsSavedListCall) Context(ctx context.Context) *AccountsReportsSavedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsReportsSavedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2630,6 +2795,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2694,6 +2862,7 @@
accountId string
savedAdStyleId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: List a specific saved ad style for the specified account.
@@ -2712,6 +2881,14 @@
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 *AccountsSavedadstylesGetCall) Context(ctx context.Context) *AccountsSavedadstylesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsSavedadstylesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2727,6 +2904,9 @@
"savedAdStyleId": c.savedAdStyleId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2784,6 +2964,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all saved ad styles in the specified account.
@@ -2818,6 +2999,14 @@
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 *AccountsSavedadstylesListCall) Context(ctx context.Context) *AccountsSavedadstylesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsSavedadstylesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2838,6 +3027,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2902,6 +3094,7 @@
accountId string
adClientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all URL channels in the specified ad client for the
@@ -2937,6 +3130,14 @@
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 *AccountsUrlchannelsListCall) Context(ctx context.Context) *AccountsUrlchannelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsUrlchannelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2958,6 +3159,9 @@
"adClientId": c.adClientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3027,6 +3231,7 @@
type AdclientsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all ad clients in this AdSense account.
@@ -3059,6 +3264,14 @@
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 *AdclientsListCall) Context(ctx context.Context) *AdclientsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdclientsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3077,6 +3290,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3132,6 +3348,7 @@
adClientId string
adUnitId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the specified ad unit in the specified ad client.
@@ -3150,6 +3367,14 @@
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 *AdunitsGetCall) Context(ctx context.Context) *AdunitsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdunitsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3165,6 +3390,9 @@
"adUnitId": c.adUnitId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3223,6 +3451,7 @@
adClientId string
adUnitId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetAdCode: Get ad code for the specified ad unit.
@@ -3241,6 +3470,14 @@
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 *AdunitsGetAdCodeCall) Context(ctx context.Context) *AdunitsGetAdCodeCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdunitsGetAdCodeCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3256,6 +3493,9 @@
"adUnitId": c.adUnitId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3313,6 +3553,7 @@
s *Service
adClientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all ad units in the specified ad client for this AdSense
@@ -3354,6 +3595,14 @@
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 *AdunitsListCall) Context(ctx context.Context) *AdunitsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdunitsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3377,6 +3626,9 @@
"adClientId": c.adClientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3446,6 +3698,7 @@
adClientId string
adUnitId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all custom channels which the specified ad unit belongs
@@ -3482,6 +3735,14 @@
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 *AdunitsCustomchannelsListCall) Context(ctx context.Context) *AdunitsCustomchannelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdunitsCustomchannelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3503,6 +3764,9 @@
"adUnitId": c.adUnitId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3572,6 +3836,7 @@
type AlertsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List the alerts for this AdSense account.
@@ -3597,6 +3862,14 @@
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 *AlertsListCall) Context(ctx context.Context) *AlertsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AlertsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3612,6 +3885,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3659,6 +3935,7 @@
adClientId string
customChannelId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get the specified custom channel from the specified ad client.
@@ -3677,6 +3954,14 @@
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 *CustomchannelsGetCall) Context(ctx context.Context) *CustomchannelsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CustomchannelsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3692,6 +3977,9 @@
"customChannelId": c.customChannelId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3749,6 +4037,7 @@
s *Service
adClientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all custom channels in the specified ad client for this
@@ -3784,6 +4073,14 @@
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 *CustomchannelsListCall) Context(ctx context.Context) *CustomchannelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CustomchannelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3804,6 +4101,9 @@
"adClientId": c.adClientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3868,6 +4168,7 @@
adClientId string
customChannelId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all ad units in the specified custom channel.
@@ -3909,6 +4210,14 @@
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 *CustomchannelsAdunitsListCall) Context(ctx context.Context) *CustomchannelsAdunitsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CustomchannelsAdunitsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3933,6 +4242,9 @@
"customChannelId": c.customChannelId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4007,6 +4319,7 @@
type MetadataDimensionsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List the metadata for the dimensions available to this AdSense
@@ -4024,6 +4337,14 @@
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 *MetadataDimensionsListCall) Context(ctx context.Context) *MetadataDimensionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MetadataDimensionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4036,6 +4357,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4074,6 +4398,7 @@
type MetadataMetricsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List the metadata for the metrics available to this AdSense
@@ -4091,6 +4416,14 @@
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 *MetadataMetricsListCall) Context(ctx context.Context) *MetadataMetricsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MetadataMetricsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4103,6 +4436,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4143,6 +4479,7 @@
startDate string
endDate string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Generate: Generate an AdSense report based on the report request sent
@@ -4239,6 +4576,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *ReportsGenerateCall) Context(ctx context.Context) *ReportsGenerateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsGenerateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4283,6 +4628,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4425,6 +4773,7 @@
s *Service
savedReportId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Generate: Generate an AdSense report based on the saved report ID
@@ -4465,6 +4814,14 @@
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 *ReportsSavedGenerateCall) Context(ctx context.Context) *ReportsSavedGenerateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsSavedGenerateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4488,6 +4845,9 @@
"savedReportId": c.savedReportId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4559,6 +4919,7 @@
type ReportsSavedListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all saved reports in this AdSense account.
@@ -4591,6 +4952,14 @@
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 *ReportsSavedListCall) Context(ctx context.Context) *ReportsSavedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsSavedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4609,6 +4978,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4663,6 +5035,7 @@
s *Service
savedAdStyleId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get a specific saved ad style from the user's account.
@@ -4680,6 +5053,14 @@
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 *SavedadstylesGetCall) Context(ctx context.Context) *SavedadstylesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SavedadstylesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4694,6 +5075,9 @@
"savedAdStyleId": c.savedAdStyleId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4743,6 +5127,7 @@
type SavedadstylesListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all saved ad styles in the user's account.
@@ -4776,6 +5161,14 @@
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 *SavedadstylesListCall) Context(ctx context.Context) *SavedadstylesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SavedadstylesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4794,6 +5187,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4848,6 +5244,7 @@
s *Service
adClientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all URL channels in the specified ad client for this
@@ -4882,6 +5279,14 @@
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 *UrlchannelsListCall) Context(ctx context.Context) *UrlchannelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UrlchannelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4902,6 +5307,9 @@
"adClientId": c.adClientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/adsense/v1.4/adsense-gen.go b/adsense/v1.4/adsense-gen.go
index 1878d41..e71d224 100644
--- a/adsense/v1.4/adsense-gen.go
+++ b/adsense/v1.4/adsense-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "adsense:v1.4"
const apiName = "adsense"
@@ -946,6 +946,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get information about the selected AdSense account.
@@ -970,6 +971,14 @@
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 *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -987,6 +996,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1041,6 +1053,7 @@
type AccountsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all accounts available to this AdSense account.
@@ -1073,6 +1086,14 @@
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 *AccountsListCall) Context(ctx context.Context) *AccountsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1091,6 +1112,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1145,6 +1169,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all ad clients in the specified account.
@@ -1178,6 +1203,14 @@
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 *AccountsAdclientsListCall) Context(ctx context.Context) *AccountsAdclientsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsAdclientsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1198,6 +1231,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1263,6 +1299,7 @@
adClientId string
adUnitId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the specified ad unit in the specified ad client for the
@@ -1283,6 +1320,14 @@
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 *AccountsAdunitsGetCall) Context(ctx context.Context) *AccountsAdunitsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsAdunitsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1299,6 +1344,9 @@
"adUnitId": c.adUnitId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1365,6 +1413,7 @@
adClientId string
adUnitId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetAdCode: Get ad code for the specified ad unit.
@@ -1384,6 +1433,14 @@
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 *AccountsAdunitsGetAdCodeCall) Context(ctx context.Context) *AccountsAdunitsGetAdCodeCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsAdunitsGetAdCodeCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1400,6 +1457,9 @@
"adUnitId": c.adUnitId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1465,6 +1525,7 @@
accountId string
adClientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all ad units in the specified ad client for the specified
@@ -1507,6 +1568,14 @@
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 *AccountsAdunitsListCall) Context(ctx context.Context) *AccountsAdunitsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsAdunitsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1531,6 +1600,9 @@
"adClientId": c.adClientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1608,6 +1680,7 @@
adClientId string
adUnitId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all custom channels which the specified ad unit belongs
@@ -1645,6 +1718,14 @@
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 *AccountsAdunitsCustomchannelsListCall) Context(ctx context.Context) *AccountsAdunitsCustomchannelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsAdunitsCustomchannelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1667,6 +1748,9 @@
"adUnitId": c.adUnitId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1745,6 +1829,7 @@
accountId string
alertId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Dismiss (delete) the specified alert from the specified
@@ -1764,6 +1849,14 @@
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 *AccountsAlertsDeleteCall) Context(ctx context.Context) *AccountsAlertsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsAlertsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1779,6 +1872,9 @@
"alertId": c.alertId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1828,6 +1924,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List the alerts for the specified AdSense account.
@@ -1854,6 +1951,14 @@
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 *AccountsAlertsListCall) Context(ctx context.Context) *AccountsAlertsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsAlertsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1871,6 +1976,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1928,6 +2036,7 @@
adClientId string
customChannelId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get the specified custom channel from the specified ad client
@@ -1948,6 +2057,14 @@
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 *AccountsCustomchannelsGetCall) Context(ctx context.Context) *AccountsCustomchannelsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsCustomchannelsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1964,6 +2081,9 @@
"customChannelId": c.customChannelId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2029,6 +2149,7 @@
accountId string
adClientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all custom channels in the specified ad client for the
@@ -2065,6 +2186,14 @@
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 *AccountsCustomchannelsListCall) Context(ctx context.Context) *AccountsCustomchannelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsCustomchannelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2086,6 +2215,9 @@
"adClientId": c.adClientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2158,6 +2290,7 @@
adClientId string
customChannelId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all ad units in the specified custom channel.
@@ -2200,6 +2333,14 @@
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 *AccountsCustomchannelsAdunitsListCall) Context(ctx context.Context) *AccountsCustomchannelsAdunitsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsCustomchannelsAdunitsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2225,6 +2366,9 @@
"customChannelId": c.customChannelId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2307,6 +2451,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List the payments for the specified AdSense account.
@@ -2324,6 +2469,14 @@
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 *AccountsPaymentsListCall) Context(ctx context.Context) *AccountsPaymentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsPaymentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2338,6 +2491,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2390,6 +2546,7 @@
startDate string
endDate string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Generate: Generate an AdSense report based on the report request sent
@@ -2480,6 +2637,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *AccountsReportsGenerateCall) Context(ctx context.Context) *AccountsReportsGenerateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsReportsGenerateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2523,6 +2688,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2667,6 +2835,7 @@
accountId string
savedReportId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Generate: Generate an AdSense report based on the saved report ID
@@ -2708,6 +2877,14 @@
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 *AccountsReportsSavedGenerateCall) Context(ctx context.Context) *AccountsReportsSavedGenerateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsReportsSavedGenerateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2732,6 +2909,9 @@
"savedReportId": c.savedReportId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2811,6 +2991,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all saved reports in the specified AdSense account.
@@ -2844,6 +3025,14 @@
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 *AccountsReportsSavedListCall) Context(ctx context.Context) *AccountsReportsSavedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsReportsSavedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2864,6 +3053,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2928,6 +3120,7 @@
accountId string
savedAdStyleId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: List a specific saved ad style for the specified account.
@@ -2946,6 +3139,14 @@
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 *AccountsSavedadstylesGetCall) Context(ctx context.Context) *AccountsSavedadstylesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsSavedadstylesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2961,6 +3162,9 @@
"savedAdStyleId": c.savedAdStyleId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3018,6 +3222,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all saved ad styles in the specified account.
@@ -3052,6 +3257,14 @@
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 *AccountsSavedadstylesListCall) Context(ctx context.Context) *AccountsSavedadstylesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsSavedadstylesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3072,6 +3285,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3136,6 +3352,7 @@
accountId string
adClientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all URL channels in the specified ad client for the
@@ -3171,6 +3388,14 @@
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 *AccountsUrlchannelsListCall) Context(ctx context.Context) *AccountsUrlchannelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsUrlchannelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3192,6 +3417,9 @@
"adClientId": c.adClientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3261,6 +3489,7 @@
type AdclientsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all ad clients in this AdSense account.
@@ -3293,6 +3522,14 @@
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 *AdclientsListCall) Context(ctx context.Context) *AdclientsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdclientsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3311,6 +3548,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3366,6 +3606,7 @@
adClientId string
adUnitId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the specified ad unit in the specified ad client.
@@ -3384,6 +3625,14 @@
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 *AdunitsGetCall) Context(ctx context.Context) *AdunitsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdunitsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3399,6 +3648,9 @@
"adUnitId": c.adUnitId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3457,6 +3709,7 @@
adClientId string
adUnitId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetAdCode: Get ad code for the specified ad unit.
@@ -3475,6 +3728,14 @@
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 *AdunitsGetAdCodeCall) Context(ctx context.Context) *AdunitsGetAdCodeCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdunitsGetAdCodeCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3490,6 +3751,9 @@
"adUnitId": c.adUnitId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3547,6 +3811,7 @@
s *Service
adClientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all ad units in the specified ad client for this AdSense
@@ -3588,6 +3853,14 @@
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 *AdunitsListCall) Context(ctx context.Context) *AdunitsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdunitsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3611,6 +3884,9 @@
"adClientId": c.adClientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3680,6 +3956,7 @@
adClientId string
adUnitId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all custom channels which the specified ad unit belongs
@@ -3716,6 +3993,14 @@
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 *AdunitsCustomchannelsListCall) Context(ctx context.Context) *AdunitsCustomchannelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdunitsCustomchannelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3737,6 +4022,9 @@
"adUnitId": c.adUnitId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3807,6 +4095,7 @@
s *Service
alertId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Dismiss (delete) the specified alert from the publisher's
@@ -3825,6 +4114,14 @@
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 *AlertsDeleteCall) Context(ctx context.Context) *AlertsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AlertsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3839,6 +4136,9 @@
"alertId": c.alertId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3880,6 +4180,7 @@
type AlertsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List the alerts for this AdSense account.
@@ -3905,6 +4206,14 @@
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 *AlertsListCall) Context(ctx context.Context) *AlertsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AlertsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3920,6 +4229,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3967,6 +4279,7 @@
adClientId string
customChannelId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get the specified custom channel from the specified ad client.
@@ -3985,6 +4298,14 @@
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 *CustomchannelsGetCall) Context(ctx context.Context) *CustomchannelsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CustomchannelsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4000,6 +4321,9 @@
"customChannelId": c.customChannelId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4057,6 +4381,7 @@
s *Service
adClientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all custom channels in the specified ad client for this
@@ -4092,6 +4417,14 @@
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 *CustomchannelsListCall) Context(ctx context.Context) *CustomchannelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CustomchannelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4112,6 +4445,9 @@
"adClientId": c.adClientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4176,6 +4512,7 @@
adClientId string
customChannelId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all ad units in the specified custom channel.
@@ -4217,6 +4554,14 @@
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 *CustomchannelsAdunitsListCall) Context(ctx context.Context) *CustomchannelsAdunitsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CustomchannelsAdunitsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4241,6 +4586,9 @@
"customChannelId": c.customChannelId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4315,6 +4663,7 @@
type MetadataDimensionsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List the metadata for the dimensions available to this AdSense
@@ -4332,6 +4681,14 @@
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 *MetadataDimensionsListCall) Context(ctx context.Context) *MetadataDimensionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MetadataDimensionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4344,6 +4701,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4382,6 +4742,7 @@
type MetadataMetricsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List the metadata for the metrics available to this AdSense
@@ -4399,6 +4760,14 @@
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 *MetadataMetricsListCall) Context(ctx context.Context) *MetadataMetricsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MetadataMetricsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4411,6 +4780,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4449,6 +4821,7 @@
type PaymentsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List the payments for this AdSense account.
@@ -4465,6 +4838,14 @@
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 *PaymentsListCall) Context(ctx context.Context) *PaymentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PaymentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4477,6 +4858,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4517,6 +4901,7 @@
startDate string
endDate string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Generate: Generate an AdSense report based on the report request sent
@@ -4613,6 +4998,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *ReportsGenerateCall) Context(ctx context.Context) *ReportsGenerateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsGenerateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4657,6 +5050,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4799,6 +5195,7 @@
s *Service
savedReportId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Generate: Generate an AdSense report based on the saved report ID
@@ -4839,6 +5236,14 @@
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 *ReportsSavedGenerateCall) Context(ctx context.Context) *ReportsSavedGenerateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsSavedGenerateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4862,6 +5267,9 @@
"savedReportId": c.savedReportId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4933,6 +5341,7 @@
type ReportsSavedListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all saved reports in this AdSense account.
@@ -4965,6 +5374,14 @@
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 *ReportsSavedListCall) Context(ctx context.Context) *ReportsSavedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsSavedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4983,6 +5400,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5037,6 +5457,7 @@
s *Service
savedAdStyleId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get a specific saved ad style from the user's account.
@@ -5054,6 +5475,14 @@
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 *SavedadstylesGetCall) Context(ctx context.Context) *SavedadstylesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SavedadstylesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5068,6 +5497,9 @@
"savedAdStyleId": c.savedAdStyleId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5117,6 +5549,7 @@
type SavedadstylesListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all saved ad styles in the user's account.
@@ -5150,6 +5583,14 @@
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 *SavedadstylesListCall) Context(ctx context.Context) *SavedadstylesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SavedadstylesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5168,6 +5609,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5222,6 +5666,7 @@
s *Service
adClientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all URL channels in the specified ad client for this
@@ -5256,6 +5701,14 @@
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 *UrlchannelsListCall) Context(ctx context.Context) *UrlchannelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UrlchannelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5276,6 +5729,9 @@
"adClientId": c.adClientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/adsensehost/v4.1/adsensehost-gen.go b/adsensehost/v4.1/adsensehost-gen.go
index 1b7c9db..844019f 100644
--- a/adsensehost/v4.1/adsensehost-gen.go
+++ b/adsensehost/v4.1/adsensehost-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "adsensehost:v4.1"
const apiName = "adsensehost"
@@ -549,6 +549,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get information about the selected associated AdSense account.
@@ -566,6 +567,14 @@
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 *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -580,6 +589,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -629,6 +641,7 @@
s *Service
filterAdClientId []string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List hosted accounts associated with this AdSense account by ad
@@ -647,6 +660,14 @@
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 *AccountsListCall) Context(ctx context.Context) *AccountsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -662,6 +683,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -713,6 +737,7 @@
accountId string
adClientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get information about one of the ad clients in the specified
@@ -732,6 +757,14 @@
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 *AccountsAdclientsGetCall) Context(ctx context.Context) *AccountsAdclientsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsAdclientsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -747,6 +780,9 @@
"adClientId": c.adClientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -803,6 +839,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all hosted ad clients in the specified hosted account.
@@ -836,6 +873,14 @@
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 *AccountsAdclientsListCall) Context(ctx context.Context) *AccountsAdclientsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsAdclientsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -856,6 +901,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -920,6 +968,7 @@
adClientId string
adUnitId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete the specified ad unit from the specified publisher
@@ -940,6 +989,14 @@
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 *AccountsAdunitsDeleteCall) Context(ctx context.Context) *AccountsAdunitsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsAdunitsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -956,6 +1013,9 @@
"adUnitId": c.adUnitId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1021,6 +1081,7 @@
adClientId string
adUnitId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get the specified host ad unit in this AdSense account.
@@ -1040,6 +1101,14 @@
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 *AccountsAdunitsGetCall) Context(ctx context.Context) *AccountsAdunitsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsAdunitsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1056,6 +1125,9 @@
"adUnitId": c.adUnitId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1121,6 +1193,7 @@
adClientId string
adUnitId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetAdCode: Get ad code for the specified ad unit, attaching the
@@ -1148,6 +1221,14 @@
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 *AccountsAdunitsGetAdCodeCall) Context(ctx context.Context) *AccountsAdunitsGetAdCodeCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsAdunitsGetAdCodeCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1167,6 +1248,9 @@
"adUnitId": c.adUnitId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1238,6 +1322,7 @@
adClientId string
adunit *AdUnit
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Insert the supplied ad unit into the specified publisher
@@ -1258,6 +1343,14 @@
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 *AccountsAdunitsInsertCall) Context(ctx context.Context) *AccountsAdunitsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsAdunitsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.adunit)
@@ -1279,6 +1372,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1339,6 +1435,7 @@
accountId string
adClientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all ad units in the specified publisher's AdSense account.
@@ -1380,6 +1477,14 @@
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 *AccountsAdunitsListCall) Context(ctx context.Context) *AccountsAdunitsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsAdunitsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1404,6 +1509,9 @@
"adClientId": c.adClientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1481,6 +1589,7 @@
adUnitId string
adunit *AdUnit
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Update the supplied ad unit in the specified publisher AdSense
@@ -1502,6 +1611,14 @@
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 *AccountsAdunitsPatchCall) Context(ctx context.Context) *AccountsAdunitsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsAdunitsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.adunit)
@@ -1524,6 +1641,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1592,6 +1712,7 @@
adClientId string
adunit *AdUnit
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Update the supplied ad unit in the specified publisher
@@ -1612,6 +1733,14 @@
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 *AccountsAdunitsUpdateCall) Context(ctx context.Context) *AccountsAdunitsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsAdunitsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.adunit)
@@ -1633,6 +1762,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1694,6 +1826,7 @@
startDate string
endDate string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Generate: Generate an AdSense report based on the report request sent
@@ -1767,6 +1900,14 @@
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 *AccountsReportsGenerateCall) Context(ctx context.Context) *AccountsReportsGenerateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsReportsGenerateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1804,6 +1945,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1919,6 +2063,7 @@
s *Service
adClientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get information about one of the ad clients in the Host AdSense
@@ -1937,6 +2082,14 @@
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 *AdclientsGetCall) Context(ctx context.Context) *AdclientsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdclientsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1951,6 +2104,9 @@
"adClientId": c.adClientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1999,6 +2155,7 @@
type AdclientsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all host ad clients in this AdSense account.
@@ -2031,6 +2188,14 @@
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 *AdclientsListCall) Context(ctx context.Context) *AdclientsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdclientsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2049,6 +2214,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2103,6 +2271,7 @@
productCode []string
websiteUrl string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Start: Create an association session for initiating an association
@@ -2136,6 +2305,14 @@
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 *AssociationsessionsStartCall) Context(ctx context.Context) *AssociationsessionsStartCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AssociationsessionsStartCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2158,6 +2335,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2239,6 +2419,7 @@
s *Service
token string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Verify: Verify an association session after the association callback
@@ -2257,6 +2438,14 @@
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 *AssociationsessionsVerifyCall) Context(ctx context.Context) *AssociationsessionsVerifyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AssociationsessionsVerifyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2270,6 +2459,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2320,6 +2512,7 @@
adClientId string
customChannelId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a specific custom channel from the host AdSense
@@ -2339,6 +2532,14 @@
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 *CustomchannelsDeleteCall) Context(ctx context.Context) *CustomchannelsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CustomchannelsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2354,6 +2555,9 @@
"customChannelId": c.customChannelId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2411,6 +2615,7 @@
adClientId string
customChannelId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get a specific custom channel from the host AdSense account.
@@ -2429,6 +2634,14 @@
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 *CustomchannelsGetCall) Context(ctx context.Context) *CustomchannelsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CustomchannelsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2444,6 +2657,9 @@
"customChannelId": c.customChannelId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2501,6 +2717,7 @@
adClientId string
customchannel *CustomChannel
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Add a new custom channel to the host AdSense account.
@@ -2519,6 +2736,14 @@
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 *CustomchannelsInsertCall) Context(ctx context.Context) *CustomchannelsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CustomchannelsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.customchannel)
@@ -2539,6 +2764,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2591,6 +2819,7 @@
s *Service
adClientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all host custom channels in this AdSense account.
@@ -2625,6 +2854,14 @@
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 *CustomchannelsListCall) Context(ctx context.Context) *CustomchannelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CustomchannelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2645,6 +2882,9 @@
"adClientId": c.adClientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2709,6 +2949,7 @@
customChannelId string
customchannel *CustomChannel
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Update a custom channel in the host AdSense account. This
@@ -2729,6 +2970,14 @@
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 *CustomchannelsPatchCall) Context(ctx context.Context) *CustomchannelsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CustomchannelsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.customchannel)
@@ -2750,6 +2999,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2810,6 +3062,7 @@
adClientId string
customchannel *CustomChannel
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Update a custom channel in the host AdSense account.
@@ -2828,6 +3081,14 @@
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 *CustomchannelsUpdateCall) Context(ctx context.Context) *CustomchannelsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CustomchannelsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.customchannel)
@@ -2848,6 +3109,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2901,6 +3165,7 @@
startDate string
endDate string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Generate: Generate an AdSense report based on the report request sent
@@ -2973,6 +3238,14 @@
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 *ReportsGenerateCall) Context(ctx context.Context) *ReportsGenerateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsGenerateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3008,6 +3281,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3117,6 +3393,7 @@
adClientId string
urlChannelId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a URL channel from the host AdSense account.
@@ -3135,6 +3412,14 @@
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 *UrlchannelsDeleteCall) Context(ctx context.Context) *UrlchannelsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UrlchannelsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3150,6 +3435,9 @@
"urlChannelId": c.urlChannelId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3207,6 +3495,7 @@
adClientId string
urlchannel *UrlChannel
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Add a new URL channel to the host AdSense account.
@@ -3225,6 +3514,14 @@
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 *UrlchannelsInsertCall) Context(ctx context.Context) *UrlchannelsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UrlchannelsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlchannel)
@@ -3245,6 +3542,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3297,6 +3597,7 @@
s *Service
adClientId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all host URL channels in the host AdSense account.
@@ -3330,6 +3631,14 @@
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 *UrlchannelsListCall) Context(ctx context.Context) *UrlchannelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UrlchannelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3350,6 +3659,9 @@
"adClientId": c.adClientId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/analytics/v2.4/analytics-gen.go b/analytics/v2.4/analytics-gen.go
index f612443..d7cfee7 100644
--- a/analytics/v2.4/analytics-gen.go
+++ b/analytics/v2.4/analytics-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "analytics:v2.4"
const apiName = "analytics"
@@ -164,6 +164,7 @@
endDate string
metrics string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns Analytics report data for a view (profile).
@@ -229,6 +230,14 @@
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 *DataGetCall) Context(ctx context.Context) *DataGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DataGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -263,6 +272,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -366,6 +378,7 @@
type ManagementAccountsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all accounts to which the user has access.
@@ -397,6 +410,14 @@
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 *ManagementAccountsListCall) Context(ctx context.Context) *ManagementAccountsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementAccountsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -415,6 +436,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -464,6 +488,7 @@
webPropertyId string
profileId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists goals to which the user has access.
@@ -498,6 +523,14 @@
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 *ManagementGoalsListCall) Context(ctx context.Context) *ManagementGoalsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementGoalsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -520,6 +553,9 @@
"profileId": c.profileId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -591,6 +627,7 @@
accountId string
webPropertyId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists views (profiles) to which the user has access.
@@ -624,6 +661,14 @@
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 *ManagementProfilesListCall) Context(ctx context.Context) *ManagementProfilesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementProfilesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -645,6 +690,9 @@
"webPropertyId": c.webPropertyId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -707,6 +755,7 @@
type ManagementSegmentsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists advanced segments to which the user has access.
@@ -738,6 +787,14 @@
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 *ManagementSegmentsListCall) Context(ctx context.Context) *ManagementSegmentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementSegmentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -756,6 +813,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -803,6 +863,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists web properties to which the user has access.
@@ -835,6 +896,14 @@
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 *ManagementWebpropertiesListCall) Context(ctx context.Context) *ManagementWebpropertiesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementWebpropertiesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -855,6 +924,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/analytics/v3/analytics-gen.go b/analytics/v3/analytics-gen.go
index 32682ef..e70e0e9 100644
--- a/analytics/v3/analytics-gen.go
+++ b/analytics/v3/analytics-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "analytics:v3"
const apiName = "analytics"
@@ -2881,6 +2881,7 @@
endDate string
metrics string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns Analytics data for a view (profile).
@@ -2972,6 +2973,14 @@
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 *DataGaGetCall) Context(ctx context.Context) *DataGaGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DataGaGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3012,6 +3021,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3154,6 +3166,7 @@
endDate string
metrics string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns Analytics Multi-Channel Funnels data for a view
@@ -3227,6 +3240,14 @@
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 *DataMcfGetCall) Context(ctx context.Context) *DataMcfGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DataMcfGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3261,6 +3282,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3383,6 +3407,7 @@
ids string
metrics string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns real time data for a view (profile).
@@ -3431,6 +3456,14 @@
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 *DataRealtimeGetCall) Context(ctx context.Context) *DataRealtimeGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DataRealtimeGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3457,6 +3490,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3539,6 +3575,7 @@
type ManagementAccountSummariesListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists account summaries (lightweight tree comprised of
@@ -3572,6 +3609,14 @@
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 *ManagementAccountSummariesListCall) Context(ctx context.Context) *ManagementAccountSummariesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementAccountSummariesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3590,6 +3635,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3645,6 +3693,7 @@
accountId string
linkId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Removes a user from the given account.
@@ -3663,6 +3712,14 @@
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 *ManagementAccountUserLinksDeleteCall) Context(ctx context.Context) *ManagementAccountUserLinksDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementAccountUserLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3678,6 +3735,9 @@
"linkId": c.linkId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3728,6 +3788,7 @@
accountId string
entityuserlink *EntityUserLink
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Adds a new user to the given account.
@@ -3746,6 +3807,14 @@
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 *ManagementAccountUserLinksInsertCall) Context(ctx context.Context) *ManagementAccountUserLinksInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementAccountUserLinksInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
@@ -3766,6 +3835,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3818,6 +3890,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists account-user links for a given account.
@@ -3850,6 +3923,14 @@
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 *ManagementAccountUserLinksListCall) Context(ctx context.Context) *ManagementAccountUserLinksListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementAccountUserLinksListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3870,6 +3951,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3935,6 +4019,7 @@
linkId string
entityuserlink *EntityUserLink
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates permissions for an existing user on the given
@@ -3955,6 +4040,14 @@
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 *ManagementAccountUserLinksUpdateCall) Context(ctx context.Context) *ManagementAccountUserLinksUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementAccountUserLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
@@ -3976,6 +4069,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4034,6 +4130,7 @@
type ManagementAccountsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all accounts to which the user has access.
@@ -4065,6 +4162,14 @@
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 *ManagementAccountsListCall) Context(ctx context.Context) *ManagementAccountsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementAccountsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4083,6 +4188,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4139,6 +4247,7 @@
accountId string
webPropertyId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List custom data sources to which the user has access.
@@ -4172,6 +4281,14 @@
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 *ManagementCustomDataSourcesListCall) Context(ctx context.Context) *ManagementCustomDataSourcesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementCustomDataSourcesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4193,6 +4310,9 @@
"webPropertyId": c.webPropertyId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4269,6 +4389,7 @@
webPropertyId string
customDimensionId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get a custom dimension to which the user has access.
@@ -4288,6 +4409,14 @@
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 *ManagementCustomDimensionsGetCall) Context(ctx context.Context) *ManagementCustomDimensionsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementCustomDimensionsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4304,6 +4433,9 @@
"customDimensionId": c.customDimensionId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4370,6 +4502,7 @@
webPropertyId string
customdimension *CustomDimension
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Create a new custom dimension.
@@ -4389,6 +4522,14 @@
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 *ManagementCustomDimensionsInsertCall) Context(ctx context.Context) *ManagementCustomDimensionsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementCustomDimensionsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.customdimension)
@@ -4410,6 +4551,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4470,6 +4614,7 @@
accountId string
webPropertyId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists custom dimensions to which the user has access.
@@ -4503,6 +4648,14 @@
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 *ManagementCustomDimensionsListCall) Context(ctx context.Context) *ManagementCustomDimensionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementCustomDimensionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4524,6 +4677,9 @@
"webPropertyId": c.webPropertyId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4597,6 +4753,7 @@
customDimensionId string
customdimension *CustomDimension
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing custom dimension. This method supports
@@ -4627,6 +4784,14 @@
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 *ManagementCustomDimensionsPatchCall) Context(ctx context.Context) *ManagementCustomDimensionsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementCustomDimensionsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.customdimension)
@@ -4652,6 +4817,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4727,6 +4895,7 @@
customDimensionId string
customdimension *CustomDimension
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing custom dimension.
@@ -4756,6 +4925,14 @@
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 *ManagementCustomDimensionsUpdateCall) Context(ctx context.Context) *ManagementCustomDimensionsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementCustomDimensionsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.customdimension)
@@ -4781,6 +4958,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4855,6 +5035,7 @@
webPropertyId string
customMetricId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get a custom metric to which the user has access.
@@ -4874,6 +5055,14 @@
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 *ManagementCustomMetricsGetCall) Context(ctx context.Context) *ManagementCustomMetricsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementCustomMetricsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4890,6 +5079,9 @@
"customMetricId": c.customMetricId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4956,6 +5148,7 @@
webPropertyId string
custommetric *CustomMetric
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Create a new custom metric.
@@ -4975,6 +5168,14 @@
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 *ManagementCustomMetricsInsertCall) Context(ctx context.Context) *ManagementCustomMetricsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementCustomMetricsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.custommetric)
@@ -4996,6 +5197,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5056,6 +5260,7 @@
accountId string
webPropertyId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists custom metrics to which the user has access.
@@ -5089,6 +5294,14 @@
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 *ManagementCustomMetricsListCall) Context(ctx context.Context) *ManagementCustomMetricsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementCustomMetricsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5110,6 +5323,9 @@
"webPropertyId": c.webPropertyId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5183,6 +5399,7 @@
customMetricId string
custommetric *CustomMetric
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing custom metric. This method supports patch
@@ -5213,6 +5430,14 @@
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 *ManagementCustomMetricsPatchCall) Context(ctx context.Context) *ManagementCustomMetricsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementCustomMetricsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.custommetric)
@@ -5238,6 +5463,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5313,6 +5541,7 @@
customMetricId string
custommetric *CustomMetric
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing custom metric.
@@ -5342,6 +5571,14 @@
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 *ManagementCustomMetricsUpdateCall) Context(ctx context.Context) *ManagementCustomMetricsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementCustomMetricsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.custommetric)
@@ -5367,6 +5604,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5442,6 +5682,7 @@
profileId string
experimentId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete an experiment.
@@ -5462,6 +5703,14 @@
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 *ManagementExperimentsDeleteCall) Context(ctx context.Context) *ManagementExperimentsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementExperimentsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5479,6 +5728,9 @@
"experimentId": c.experimentId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5546,6 +5798,7 @@
profileId string
experimentId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns an experiment to which the user has access.
@@ -5566,6 +5819,14 @@
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 *ManagementExperimentsGetCall) Context(ctx context.Context) *ManagementExperimentsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementExperimentsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5583,6 +5844,9 @@
"experimentId": c.experimentId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5658,6 +5922,7 @@
profileId string
experiment *Experiment
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Create a new experiment.
@@ -5678,6 +5943,14 @@
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 *ManagementExperimentsInsertCall) Context(ctx context.Context) *ManagementExperimentsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementExperimentsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.experiment)
@@ -5700,6 +5973,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5769,6 +6045,7 @@
webPropertyId string
profileId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists experiments to which the user has access.
@@ -5803,6 +6080,14 @@
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 *ManagementExperimentsListCall) Context(ctx context.Context) *ManagementExperimentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementExperimentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5825,6 +6110,9 @@
"profileId": c.profileId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5910,6 +6198,7 @@
experimentId string
experiment *Experiment
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Update an existing experiment. This method supports patch
@@ -5932,6 +6221,14 @@
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 *ManagementExperimentsPatchCall) Context(ctx context.Context) *ManagementExperimentsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementExperimentsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.experiment)
@@ -5955,6 +6252,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6033,6 +6333,7 @@
experimentId string
experiment *Experiment
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Update an existing experiment.
@@ -6054,6 +6355,14 @@
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 *ManagementExperimentsUpdateCall) Context(ctx context.Context) *ManagementExperimentsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementExperimentsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.experiment)
@@ -6077,6 +6386,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6152,6 +6464,7 @@
accountId string
filterId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a filter.
@@ -6170,6 +6483,14 @@
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 *ManagementFiltersDeleteCall) Context(ctx context.Context) *ManagementFiltersDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementFiltersDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6185,6 +6506,9 @@
"filterId": c.filterId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6242,6 +6566,7 @@
accountId string
filterId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns a filters to which the user has access.
@@ -6260,6 +6585,14 @@
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 *ManagementFiltersGetCall) Context(ctx context.Context) *ManagementFiltersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementFiltersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6275,6 +6608,9 @@
"filterId": c.filterId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6333,6 +6669,7 @@
accountId string
filter *Filter
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Create a new filter.
@@ -6351,6 +6688,14 @@
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 *ManagementFiltersInsertCall) Context(ctx context.Context) *ManagementFiltersInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementFiltersInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.filter)
@@ -6371,6 +6716,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6423,6 +6771,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all filters for an account
@@ -6455,6 +6804,14 @@
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 *ManagementFiltersListCall) Context(ctx context.Context) *ManagementFiltersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementFiltersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6475,6 +6832,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6541,6 +6901,7 @@
filterId string
filter *Filter
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing filter. This method supports patch
@@ -6561,6 +6922,14 @@
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 *ManagementFiltersPatchCall) Context(ctx context.Context) *ManagementFiltersPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementFiltersPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.filter)
@@ -6582,6 +6951,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6643,6 +7015,7 @@
filterId string
filter *Filter
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing filter.
@@ -6662,6 +7035,14 @@
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 *ManagementFiltersUpdateCall) Context(ctx context.Context) *ManagementFiltersUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementFiltersUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.filter)
@@ -6683,6 +7064,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6745,6 +7129,7 @@
profileId string
goalId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a goal to which the user has access.
@@ -6765,6 +7150,14 @@
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 *ManagementGoalsGetCall) Context(ctx context.Context) *ManagementGoalsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementGoalsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6782,6 +7175,9 @@
"goalId": c.goalId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6856,6 +7252,7 @@
profileId string
goal *Goal
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Create a new goal.
@@ -6876,6 +7273,14 @@
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 *ManagementGoalsInsertCall) Context(ctx context.Context) *ManagementGoalsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementGoalsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.goal)
@@ -6898,6 +7303,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6966,6 +7374,7 @@
webPropertyId string
profileId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists goals to which the user has access.
@@ -7000,6 +7409,14 @@
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 *ManagementGoalsListCall) Context(ctx context.Context) *ManagementGoalsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementGoalsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7022,6 +7439,9 @@
"profileId": c.profileId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7104,6 +7524,7 @@
goalId string
goal *Goal
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing view (profile). This method supports patch
@@ -7126,6 +7547,14 @@
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 *ManagementGoalsPatchCall) Context(ctx context.Context) *ManagementGoalsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementGoalsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.goal)
@@ -7149,6 +7578,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7226,6 +7658,7 @@
goalId string
goal *Goal
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing view (profile).
@@ -7247,6 +7680,14 @@
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 *ManagementGoalsUpdateCall) Context(ctx context.Context) *ManagementGoalsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementGoalsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.goal)
@@ -7270,6 +7711,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7346,6 +7790,7 @@
profileId string
linkId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a profile filter link.
@@ -7366,6 +7811,14 @@
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 *ManagementProfileFilterLinksDeleteCall) Context(ctx context.Context) *ManagementProfileFilterLinksDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementProfileFilterLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7383,6 +7836,9 @@
"linkId": c.linkId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7453,6 +7909,7 @@
profileId string
linkId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns a single profile filter link.
@@ -7473,6 +7930,14 @@
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 *ManagementProfileFilterLinksGetCall) Context(ctx context.Context) *ManagementProfileFilterLinksGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementProfileFilterLinksGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7490,6 +7955,9 @@
"linkId": c.linkId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7568,6 +8036,7 @@
profileId string
profilefilterlink *ProfileFilterLink
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Create a new profile filter link.
@@ -7588,6 +8057,14 @@
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 *ManagementProfileFilterLinksInsertCall) Context(ctx context.Context) *ManagementProfileFilterLinksInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementProfileFilterLinksInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.profilefilterlink)
@@ -7610,6 +8087,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7681,6 +8161,7 @@
webPropertyId string
profileId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all profile filter links for a profile.
@@ -7715,6 +8196,14 @@
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 *ManagementProfileFilterLinksListCall) Context(ctx context.Context) *ManagementProfileFilterLinksListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementProfileFilterLinksListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7737,6 +8226,9 @@
"profileId": c.profileId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7819,6 +8311,7 @@
linkId string
profilefilterlink *ProfileFilterLink
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Update an existing profile filter link. This method supports
@@ -7841,6 +8334,14 @@
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 *ManagementProfileFilterLinksPatchCall) Context(ctx context.Context) *ManagementProfileFilterLinksPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementProfileFilterLinksPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.profilefilterlink)
@@ -7864,6 +8365,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7945,6 +8449,7 @@
linkId string
profilefilterlink *ProfileFilterLink
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Update an existing profile filter link.
@@ -7966,6 +8471,14 @@
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 *ManagementProfileFilterLinksUpdateCall) Context(ctx context.Context) *ManagementProfileFilterLinksUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementProfileFilterLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.profilefilterlink)
@@ -7989,6 +8502,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8069,6 +8585,7 @@
profileId string
linkId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Removes a user from the given view (profile).
@@ -8089,6 +8606,14 @@
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 *ManagementProfileUserLinksDeleteCall) Context(ctx context.Context) *ManagementProfileUserLinksDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementProfileUserLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8106,6 +8631,9 @@
"linkId": c.linkId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8172,6 +8700,7 @@
profileId string
entityuserlink *EntityUserLink
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Adds a new user to the given view (profile).
@@ -8192,6 +8721,14 @@
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 *ManagementProfileUserLinksInsertCall) Context(ctx context.Context) *ManagementProfileUserLinksInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementProfileUserLinksInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
@@ -8214,6 +8751,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8282,6 +8822,7 @@
webPropertyId string
profileId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists profile-user links for a given view (profile).
@@ -8316,6 +8857,14 @@
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 *ManagementProfileUserLinksListCall) Context(ctx context.Context) *ManagementProfileUserLinksListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementProfileUserLinksListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8338,6 +8887,9 @@
"profileId": c.profileId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8419,6 +8971,7 @@
linkId string
entityuserlink *EntityUserLink
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates permissions for an existing user on the given view
@@ -8441,6 +8994,14 @@
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 *ManagementProfileUserLinksUpdateCall) Context(ctx context.Context) *ManagementProfileUserLinksUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementProfileUserLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
@@ -8464,6 +9025,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8539,6 +9103,7 @@
webPropertyId string
profileId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a view (profile).
@@ -8558,6 +9123,14 @@
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 *ManagementProfilesDeleteCall) Context(ctx context.Context) *ManagementProfilesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementProfilesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8574,6 +9147,9 @@
"profileId": c.profileId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8632,6 +9208,7 @@
webPropertyId string
profileId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a view (profile) to which the user has access.
@@ -8651,6 +9228,14 @@
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 *ManagementProfilesGetCall) Context(ctx context.Context) *ManagementProfilesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementProfilesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8667,6 +9252,9 @@
"profileId": c.profileId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8736,6 +9324,7 @@
webPropertyId string
profile *Profile
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Create a new view (profile).
@@ -8755,6 +9344,14 @@
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 *ManagementProfilesInsertCall) Context(ctx context.Context) *ManagementProfilesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementProfilesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.profile)
@@ -8776,6 +9373,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8836,6 +9436,7 @@
accountId string
webPropertyId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists views (profiles) to which the user has access.
@@ -8869,6 +9470,14 @@
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 *ManagementProfilesListCall) Context(ctx context.Context) *ManagementProfilesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementProfilesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8890,6 +9499,9 @@
"webPropertyId": c.webPropertyId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8964,6 +9576,7 @@
profileId string
profile *Profile
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing view (profile). This method supports patch
@@ -8985,6 +9598,14 @@
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 *ManagementProfilesPatchCall) Context(ctx context.Context) *ManagementProfilesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementProfilesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.profile)
@@ -9007,6 +9628,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9076,6 +9700,7 @@
profileId string
profile *Profile
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing view (profile).
@@ -9096,6 +9721,14 @@
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 *ManagementProfilesUpdateCall) Context(ctx context.Context) *ManagementProfilesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementProfilesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.profile)
@@ -9118,6 +9751,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9183,6 +9819,7 @@
type ManagementSegmentsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists segments to which the user has access.
@@ -9214,6 +9851,14 @@
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 *ManagementSegmentsListCall) Context(ctx context.Context) *ManagementSegmentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementSegmentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9232,6 +9877,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9290,6 +9938,7 @@
profileId string
unsampledReportId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns a single unsampled report.
@@ -9310,6 +9959,14 @@
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 *ManagementUnsampledReportsGetCall) Context(ctx context.Context) *ManagementUnsampledReportsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementUnsampledReportsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9327,6 +9984,9 @@
"unsampledReportId": c.unsampledReportId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9402,6 +10062,7 @@
profileId string
unsampledreport *UnsampledReport
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Create a new unsampled report.
@@ -9422,6 +10083,14 @@
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 *ManagementUnsampledReportsInsertCall) Context(ctx context.Context) *ManagementUnsampledReportsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementUnsampledReportsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.unsampledreport)
@@ -9444,6 +10113,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9513,6 +10185,7 @@
webPropertyId string
profileId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists unsampled reports to which the user has access.
@@ -9547,6 +10220,14 @@
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 *ManagementUnsampledReportsListCall) Context(ctx context.Context) *ManagementUnsampledReportsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementUnsampledReportsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9569,6 +10250,9 @@
"profileId": c.profileId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9650,6 +10334,7 @@
customDataSourceId string
analyticsdataimportdeleteuploaddatarequest *AnalyticsDataimportDeleteUploadDataRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// DeleteUploadData: Delete data associated with a previous upload.
@@ -9670,6 +10355,14 @@
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 *ManagementUploadsDeleteUploadDataCall) Context(ctx context.Context) *ManagementUploadsDeleteUploadDataCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementUploadsDeleteUploadDataCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.analyticsdataimportdeleteuploaddatarequest)
@@ -9692,6 +10385,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9758,6 +10454,7 @@
customDataSourceId string
uploadId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: List uploads to which the user has access.
@@ -9778,6 +10475,14 @@
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 *ManagementUploadsGetCall) Context(ctx context.Context) *ManagementUploadsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementUploadsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9795,6 +10500,9 @@
"uploadId": c.uploadId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9873,6 +10581,7 @@
webPropertyId string
customDataSourceId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List uploads to which the user has access.
@@ -9907,6 +10616,14 @@
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 *ManagementUploadsListCall) Context(ctx context.Context) *ManagementUploadsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementUploadsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9929,6 +10646,9 @@
"customDataSourceId": c.customDataSourceId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10016,8 +10736,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// UploadData: Upload data for a custom data source.
@@ -10037,10 +10757,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will 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
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -10065,6 +10787,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *ManagementUploadsUploadDataCall) Context(ctx context.Context) *ManagementUploadsUploadDataCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementUploadsUploadDataCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10103,6 +10835,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10211,6 +10946,7 @@
webPropertyId string
webPropertyAdWordsLinkId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a web property-AdWords link.
@@ -10230,6 +10966,14 @@
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 *ManagementWebPropertyAdWordsLinksDeleteCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementWebPropertyAdWordsLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10246,6 +10990,9 @@
"webPropertyAdWordsLinkId": c.webPropertyAdWordsLinkId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10304,6 +11051,7 @@
webPropertyId string
webPropertyAdWordsLinkId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns a web property-AdWords link to which the user has
@@ -10324,6 +11072,14 @@
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 *ManagementWebPropertyAdWordsLinksGetCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementWebPropertyAdWordsLinksGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10340,6 +11096,9 @@
"webPropertyAdWordsLinkId": c.webPropertyAdWordsLinkId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10406,6 +11165,7 @@
webPropertyId string
entityadwordslink *EntityAdWordsLink
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a webProperty-AdWords link.
@@ -10425,6 +11185,14 @@
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 *ManagementWebPropertyAdWordsLinksInsertCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementWebPropertyAdWordsLinksInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityadwordslink)
@@ -10446,6 +11214,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10506,6 +11277,7 @@
accountId string
webPropertyId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists webProperty-AdWords links for a given web property.
@@ -10539,6 +11311,14 @@
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 *ManagementWebPropertyAdWordsLinksListCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementWebPropertyAdWordsLinksListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10560,6 +11340,9 @@
"webPropertyId": c.webPropertyId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10634,6 +11417,7 @@
webPropertyAdWordsLinkId string
entityadwordslink *EntityAdWordsLink
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing webProperty-AdWords link. This method
@@ -10655,6 +11439,14 @@
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 *ManagementWebPropertyAdWordsLinksPatchCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementWebPropertyAdWordsLinksPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityadwordslink)
@@ -10677,6 +11469,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10746,6 +11541,7 @@
webPropertyAdWordsLinkId string
entityadwordslink *EntityAdWordsLink
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing webProperty-AdWords link.
@@ -10766,6 +11562,14 @@
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 *ManagementWebPropertyAdWordsLinksUpdateCall) Context(ctx context.Context) *ManagementWebPropertyAdWordsLinksUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementWebPropertyAdWordsLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityadwordslink)
@@ -10788,6 +11592,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10855,6 +11662,7 @@
accountId string
webPropertyId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a web property to which the user has access.
@@ -10873,6 +11681,14 @@
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 *ManagementWebpropertiesGetCall) Context(ctx context.Context) *ManagementWebpropertiesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementWebpropertiesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10888,6 +11704,9 @@
"webPropertyId": c.webPropertyId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10948,6 +11767,7 @@
accountId string
webproperty *Webproperty
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Create a new property if the account has fewer than 20
@@ -10968,6 +11788,14 @@
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 *ManagementWebpropertiesInsertCall) Context(ctx context.Context) *ManagementWebpropertiesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementWebpropertiesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.webproperty)
@@ -10988,6 +11816,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11040,6 +11871,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists web properties to which the user has access.
@@ -11072,6 +11904,14 @@
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 *ManagementWebpropertiesListCall) Context(ctx context.Context) *ManagementWebpropertiesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementWebpropertiesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -11092,6 +11932,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11158,6 +12001,7 @@
webPropertyId string
webproperty *Webproperty
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing web property. This method supports patch
@@ -11178,6 +12022,14 @@
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 *ManagementWebpropertiesPatchCall) Context(ctx context.Context) *ManagementWebpropertiesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementWebpropertiesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.webproperty)
@@ -11199,6 +12051,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11260,6 +12115,7 @@
webPropertyId string
webproperty *Webproperty
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing web property.
@@ -11279,6 +12135,14 @@
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 *ManagementWebpropertiesUpdateCall) Context(ctx context.Context) *ManagementWebpropertiesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementWebpropertiesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.webproperty)
@@ -11300,6 +12164,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11361,6 +12228,7 @@
webPropertyId string
linkId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Removes a user from the given web property.
@@ -11380,6 +12248,14 @@
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 *ManagementWebpropertyUserLinksDeleteCall) Context(ctx context.Context) *ManagementWebpropertyUserLinksDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementWebpropertyUserLinksDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -11396,6 +12272,9 @@
"linkId": c.linkId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11454,6 +12333,7 @@
webPropertyId string
entityuserlink *EntityUserLink
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Adds a new user to the given web property.
@@ -11473,6 +12353,14 @@
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 *ManagementWebpropertyUserLinksInsertCall) Context(ctx context.Context) *ManagementWebpropertyUserLinksInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementWebpropertyUserLinksInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
@@ -11494,6 +12382,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11554,6 +12445,7 @@
accountId string
webPropertyId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists webProperty-user links for a given web property.
@@ -11587,6 +12479,14 @@
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 *ManagementWebpropertyUserLinksListCall) Context(ctx context.Context) *ManagementWebpropertyUserLinksListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementWebpropertyUserLinksListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -11608,6 +12508,9 @@
"webPropertyId": c.webPropertyId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11681,6 +12584,7 @@
linkId string
entityuserlink *EntityUserLink
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates permissions for an existing user on the given web
@@ -11702,6 +12606,14 @@
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 *ManagementWebpropertyUserLinksUpdateCall) Context(ctx context.Context) *ManagementWebpropertyUserLinksUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagementWebpropertyUserLinksUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.entityuserlink)
@@ -11724,6 +12636,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11790,6 +12705,7 @@
s *Service
reportType string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all columns for a report type
@@ -11807,6 +12723,14 @@
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 *MetadataColumnsListCall) Context(ctx context.Context) *MetadataColumnsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MetadataColumnsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -11821,6 +12745,9 @@
"reportType": c.reportType,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11873,6 +12800,7 @@
s *Service
accountticket *AccountTicket
opt_ map[string]interface{}
+ ctx_ context.Context
}
// CreateAccountTicket: Creates an account ticket.
@@ -11890,6 +12818,14 @@
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 *ProvisioningCreateAccountTicketCall) Context(ctx context.Context) *ProvisioningCreateAccountTicketCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProvisioningCreateAccountTicketCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountticket)
@@ -11908,6 +12844,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/androidenterprise/v1/androidenterprise-gen.go b/androidenterprise/v1/androidenterprise-gen.go
index 672b259..0fabde9 100644
--- a/androidenterprise/v1/androidenterprise-gen.go
+++ b/androidenterprise/v1/androidenterprise-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "androidenterprise:v1"
const apiName = "androidenterprise"
@@ -873,6 +873,7 @@
enterpriseId string
collectionId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a collection.
@@ -891,6 +892,14 @@
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 *CollectionsDeleteCall) Context(ctx context.Context) *CollectionsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CollectionsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -906,6 +915,9 @@
"collectionId": c.collectionId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -956,6 +968,7 @@
enterpriseId string
collectionId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves the details of a collection.
@@ -974,6 +987,14 @@
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 *CollectionsGetCall) Context(ctx context.Context) *CollectionsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CollectionsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -989,6 +1010,9 @@
"collectionId": c.collectionId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1046,6 +1070,7 @@
enterpriseId string
collection *Collection
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a new collection.
@@ -1064,6 +1089,14 @@
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 *CollectionsInsertCall) Context(ctx context.Context) *CollectionsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CollectionsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.collection)
@@ -1084,6 +1117,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1136,6 +1172,7 @@
s *Service
enterpriseId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the IDs of all the collections for an enterprise.
@@ -1153,6 +1190,14 @@
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 *CollectionsListCall) Context(ctx context.Context) *CollectionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CollectionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1167,6 +1212,9 @@
"enterpriseId": c.enterpriseId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1218,6 +1266,7 @@
collectionId string
collection *Collection
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a collection. This method supports patch semantics.
@@ -1237,6 +1286,14 @@
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 *CollectionsPatchCall) Context(ctx context.Context) *CollectionsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CollectionsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.collection)
@@ -1258,6 +1315,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1319,6 +1379,7 @@
collectionId string
collection *Collection
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a collection.
@@ -1338,6 +1399,14 @@
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 *CollectionsUpdateCall) Context(ctx context.Context) *CollectionsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CollectionsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.collection)
@@ -1359,6 +1428,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1420,6 +1492,7 @@
collectionId string
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Removes the user from the list of those specifically allowed
@@ -1441,6 +1514,14 @@
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 *CollectionviewersDeleteCall) Context(ctx context.Context) *CollectionviewersDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CollectionviewersDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1457,6 +1538,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1515,6 +1599,7 @@
collectionId string
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves the ID of the user if they have been specifically
@@ -1536,6 +1621,14 @@
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 *CollectionviewersGetCall) Context(ctx context.Context) *CollectionviewersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CollectionviewersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1552,6 +1645,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1616,6 +1712,7 @@
enterpriseId string
collectionId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the IDs of the users who have been specifically
@@ -1636,6 +1733,14 @@
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 *CollectionviewersListCall) Context(ctx context.Context) *CollectionviewersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CollectionviewersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1651,6 +1756,9 @@
"collectionId": c.collectionId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1710,6 +1818,7 @@
userId string
user *User
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Adds the user to the list of those specifically allowed to see
@@ -1733,6 +1842,14 @@
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 *CollectionviewersPatchCall) Context(ctx context.Context) *CollectionviewersPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CollectionviewersPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
@@ -1755,6 +1872,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1824,6 +1944,7 @@
userId string
user *User
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Adds the user to the list of those specifically allowed to
@@ -1846,6 +1967,14 @@
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 *CollectionviewersUpdateCall) Context(ctx context.Context) *CollectionviewersUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CollectionviewersUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
@@ -1868,6 +1997,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1936,6 +2068,7 @@
userId string
deviceId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves the details of a device.
@@ -1955,6 +2088,14 @@
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 *DevicesGetCall) Context(ctx context.Context) *DevicesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DevicesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1971,6 +2112,9 @@
"deviceId": c.deviceId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2036,6 +2180,7 @@
userId string
deviceId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetState: Retrieves whether a device is enabled or disabled for
@@ -2059,6 +2204,14 @@
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 *DevicesGetStateCall) Context(ctx context.Context) *DevicesGetStateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DevicesGetStateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2075,6 +2228,9 @@
"deviceId": c.deviceId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2139,6 +2295,7 @@
enterpriseId string
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the IDs of all of a user's devices.
@@ -2157,6 +2314,14 @@
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 *DevicesListCall) Context(ctx context.Context) *DevicesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DevicesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2172,6 +2337,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2231,6 +2399,7 @@
deviceId string
devicestate *DeviceState
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetState: Sets whether a device is enabled or disabled for access by
@@ -2255,6 +2424,14 @@
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 *DevicesSetStateCall) Context(ctx context.Context) *DevicesSetStateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DevicesSetStateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.devicestate)
@@ -2277,6 +2454,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2343,6 +2523,7 @@
s *Service
enterpriseId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the binding between the MDM and enterprise. This is
@@ -2363,6 +2544,14 @@
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 *EnterprisesDeleteCall) Context(ctx context.Context) *EnterprisesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EnterprisesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2377,6 +2566,9 @@
"enterpriseId": c.enterpriseId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2420,6 +2612,7 @@
token string
enterprise *Enterprise
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Enroll: Enrolls an enterprise with the calling MDM.
@@ -2438,6 +2631,14 @@
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 *EnterprisesEnrollCall) Context(ctx context.Context) *EnterprisesEnrollCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EnterprisesEnrollCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.enterprise)
@@ -2457,6 +2658,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2509,6 +2713,7 @@
s *Service
enterpriseId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves the name and domain of an enterprise.
@@ -2526,6 +2731,14 @@
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 *EnterprisesGetCall) Context(ctx context.Context) *EnterprisesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EnterprisesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2540,6 +2753,9 @@
"enterpriseId": c.enterpriseId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2590,6 +2806,7 @@
token string
enterprise *Enterprise
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Establishes the binding between the MDM and an enterprise.
@@ -2609,6 +2826,14 @@
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 *EnterprisesInsertCall) Context(ctx context.Context) *EnterprisesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EnterprisesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.enterprise)
@@ -2628,6 +2853,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2680,6 +2908,7 @@
s *Service
domain string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Looks up an enterprise by domain name.
@@ -2697,6 +2926,14 @@
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 *EnterprisesListCall) Context(ctx context.Context) *EnterprisesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EnterprisesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2710,6 +2947,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2759,6 +2999,7 @@
s *Service
enterpriseId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SendTestPushNotification: Sends a test push notification to validate
@@ -2778,6 +3019,14 @@
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 *EnterprisesSendTestPushNotificationCall) Context(ctx context.Context) *EnterprisesSendTestPushNotificationCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EnterprisesSendTestPushNotificationCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2792,6 +3041,9 @@
"enterpriseId": c.enterpriseId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2842,6 +3094,7 @@
enterpriseId string
enterpriseaccount *EnterpriseAccount
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetAccount: Set the account that will be used to authenticate to the
@@ -2861,6 +3114,14 @@
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 *EnterprisesSetAccountCall) Context(ctx context.Context) *EnterprisesSetAccountCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EnterprisesSetAccountCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.enterpriseaccount)
@@ -2881,6 +3142,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2933,6 +3197,7 @@
s *Service
enterpriseId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Unenroll: Unenrolls an enterprise from the calling MDM.
@@ -2950,6 +3215,14 @@
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 *EnterprisesUnenrollCall) Context(ctx context.Context) *EnterprisesUnenrollCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EnterprisesUnenrollCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2964,6 +3237,9 @@
"enterpriseId": c.enterpriseId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3008,6 +3284,7 @@
userId string
entitlementId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Removes an entitlement to an app for a user and uninstalls
@@ -3028,6 +3305,14 @@
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 *EntitlementsDeleteCall) Context(ctx context.Context) *EntitlementsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EntitlementsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3044,6 +3329,9 @@
"entitlementId": c.entitlementId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3102,6 +3390,7 @@
userId string
entitlementId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves details of an entitlement.
@@ -3121,6 +3410,14 @@
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 *EntitlementsGetCall) Context(ctx context.Context) *EntitlementsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EntitlementsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3137,6 +3434,9 @@
"entitlementId": c.entitlementId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3201,6 +3501,7 @@
enterpriseId string
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List of all entitlements for the specified user. Only the ID is
@@ -3220,6 +3521,14 @@
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 *EntitlementsListCall) Context(ctx context.Context) *EntitlementsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EntitlementsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3235,6 +3544,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3294,6 +3606,7 @@
entitlementId string
entitlement *Entitlement
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Adds or updates an entitlement to an app for a user. This
@@ -3325,6 +3638,14 @@
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 *EntitlementsPatchCall) Context(ctx context.Context) *EntitlementsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EntitlementsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.entitlement)
@@ -3350,6 +3671,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3424,6 +3748,7 @@
entitlementId string
entitlement *Entitlement
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Adds or updates an entitlement to an app for a user.
@@ -3454,6 +3779,14 @@
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 *EntitlementsUpdateCall) Context(ctx context.Context) *EntitlementsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EntitlementsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.entitlement)
@@ -3479,6 +3812,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3551,6 +3887,7 @@
enterpriseId string
groupLicenseId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves details of an enterprise's group license for a
@@ -3570,6 +3907,14 @@
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 *GrouplicensesGetCall) Context(ctx context.Context) *GrouplicensesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GrouplicensesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3585,6 +3930,9 @@
"groupLicenseId": c.groupLicenseId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3641,6 +3989,7 @@
s *Service
enterpriseId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves IDs of all products for which the enterprise has a
@@ -3659,6 +4008,14 @@
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 *GrouplicensesListCall) Context(ctx context.Context) *GrouplicensesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GrouplicensesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3673,6 +4030,9 @@
"enterpriseId": c.enterpriseId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3723,6 +4083,7 @@
enterpriseId string
groupLicenseId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the IDs of the users who have been granted
@@ -3742,6 +4103,14 @@
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 *GrouplicenseusersListCall) Context(ctx context.Context) *GrouplicenseusersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GrouplicenseusersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3757,6 +4126,9 @@
"groupLicenseId": c.groupLicenseId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3816,6 +4188,7 @@
deviceId string
installId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Requests to remove an app from a device. A call to get or
@@ -3838,6 +4211,14 @@
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 *InstallsDeleteCall) Context(ctx context.Context) *InstallsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstallsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3855,6 +4236,9 @@
"installId": c.installId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3921,6 +4305,7 @@
deviceId string
installId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves details of an installation of an app on a device.
@@ -3941,6 +4326,14 @@
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 *InstallsGetCall) Context(ctx context.Context) *InstallsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstallsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3958,6 +4351,9 @@
"installId": c.installId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4030,6 +4426,7 @@
userId string
deviceId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the details of all apps installed on the specified
@@ -4050,6 +4447,14 @@
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 *InstallsListCall) Context(ctx context.Context) *InstallsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstallsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4066,6 +4471,9 @@
"deviceId": c.deviceId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4133,6 +4541,7 @@
installId string
install *Install
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Requests to install the latest version of an app to a device.
@@ -4156,6 +4565,14 @@
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 *InstallsPatchCall) Context(ctx context.Context) *InstallsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstallsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.install)
@@ -4179,6 +4596,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4256,6 +4676,7 @@
installId string
install *Install
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Requests to install the latest version of an app to a device.
@@ -4279,6 +4700,14 @@
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 *InstallsUpdateCall) Context(ctx context.Context) *InstallsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstallsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.install)
@@ -4302,6 +4731,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4375,6 +4807,7 @@
s *Service
permissionId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves details of an Android app permission for display to an
@@ -4400,6 +4833,14 @@
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 *PermissionsGetCall) Context(ctx context.Context) *PermissionsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PermissionsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4417,6 +4858,9 @@
"permissionId": c.permissionId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4473,6 +4917,7 @@
productId string
productsapproverequest *ProductsApproveRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Approve: Approves the specified product (and the relevant app
@@ -4493,6 +4938,14 @@
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 *ProductsApproveCall) Context(ctx context.Context) *ProductsApproveCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProductsApproveCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.productsapproverequest)
@@ -4514,6 +4967,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4567,6 +5023,7 @@
enterpriseId string
productId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GenerateApprovalUrl: Generates a URL that can be rendered in an
@@ -4603,6 +5060,14 @@
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 *ProductsGenerateApprovalUrlCall) Context(ctx context.Context) *ProductsGenerateApprovalUrlCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProductsGenerateApprovalUrlCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4621,6 +5086,9 @@
"productId": c.productId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4683,6 +5151,7 @@
enterpriseId string
productId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves details of a product for display to an enterprise
@@ -4709,6 +5178,14 @@
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 *ProductsGetCall) Context(ctx context.Context) *ProductsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProductsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4727,6 +5204,9 @@
"productId": c.productId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4789,6 +5269,7 @@
enterpriseId string
productId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetAppRestrictionsSchema: Retrieves the schema defining app
@@ -4816,6 +5297,14 @@
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 *ProductsGetAppRestrictionsSchemaCall) Context(ctx context.Context) *ProductsGetAppRestrictionsSchemaCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProductsGetAppRestrictionsSchemaCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4834,6 +5323,9 @@
"productId": c.productId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4896,6 +5388,7 @@
enterpriseId string
productId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetPermissions: Retrieves the Android app permissions required by
@@ -4915,6 +5408,14 @@
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 *ProductsGetPermissionsCall) Context(ctx context.Context) *ProductsGetPermissionsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProductsGetPermissionsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4930,6 +5431,9 @@
"productId": c.productId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4988,6 +5492,7 @@
productId string
productpermissions *ProductPermissions
opt_ map[string]interface{}
+ ctx_ context.Context
}
// UpdatePermissions: Updates the set of Android app permissions for
@@ -5008,6 +5513,14 @@
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 *ProductsUpdatePermissionsCall) Context(ctx context.Context) *ProductsUpdatePermissionsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProductsUpdatePermissionsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.productpermissions)
@@ -5029,6 +5542,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5089,6 +5605,7 @@
enterpriseId string
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GenerateToken: Generates a token (activation code) to allow this user
@@ -5109,6 +5626,14 @@
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 *UsersGenerateTokenCall) Context(ctx context.Context) *UsersGenerateTokenCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersGenerateTokenCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5124,6 +5649,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5181,6 +5709,7 @@
enterpriseId string
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a user's details.
@@ -5199,6 +5728,14 @@
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 *UsersGetCall) Context(ctx context.Context) *UsersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5214,6 +5751,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5271,6 +5811,7 @@
enterpriseId string
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetAvailableProductSet: Retrieves the set of products a user is
@@ -5290,6 +5831,14 @@
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 *UsersGetAvailableProductSetCall) Context(ctx context.Context) *UsersGetAvailableProductSetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersGetAvailableProductSetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5305,6 +5854,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5362,6 +5914,7 @@
enterpriseId string
email string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Looks up a user by email address.
@@ -5380,6 +5933,14 @@
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 *UsersListCall) Context(ctx context.Context) *UsersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5395,6 +5956,9 @@
"enterpriseId": c.enterpriseId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5452,6 +6016,7 @@
enterpriseId string
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// RevokeToken: Revokes a previously generated token (activation code)
@@ -5471,6 +6036,14 @@
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 *UsersRevokeTokenCall) Context(ctx context.Context) *UsersRevokeTokenCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersRevokeTokenCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5486,6 +6059,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5537,6 +6113,7 @@
userId string
productset *ProductSet
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetAvailableProductSet: Modifies the set of products a user is
@@ -5557,6 +6134,14 @@
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 *UsersSetAvailableProductSetCall) Context(ctx context.Context) *UsersSetAvailableProductSetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersSetAvailableProductSetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.productset)
@@ -5578,6 +6163,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/androidpublisher/v1.1/androidpublisher-gen.go b/androidpublisher/v1.1/androidpublisher-gen.go
index 9095f71..875bc08 100644
--- a/androidpublisher/v1.1/androidpublisher-gen.go
+++ b/androidpublisher/v1.1/androidpublisher-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "androidpublisher:v1.1"
const apiName = "androidpublisher"
@@ -148,6 +148,7 @@
productId string
token string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Checks the purchase and consumption status of an inapp item.
@@ -167,6 +168,14 @@
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 *InapppurchasesGetCall) Context(ctx context.Context) *InapppurchasesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InapppurchasesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -183,6 +192,9 @@
"token": c.token,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -248,6 +260,7 @@
subscriptionId string
token string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Cancel: Cancels a user's subscription purchase. The subscription
@@ -268,6 +281,14 @@
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 *PurchasesCancelCall) Context(ctx context.Context) *PurchasesCancelCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PurchasesCancelCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -284,6 +305,9 @@
"token": c.token,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -342,6 +366,7 @@
subscriptionId string
token string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Checks whether a user's subscription purchase is valid and
@@ -362,6 +387,14 @@
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 *PurchasesGetCall) Context(ctx context.Context) *PurchasesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PurchasesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -378,6 +411,9 @@
"token": c.token,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/androidpublisher/v1/androidpublisher-gen.go b/androidpublisher/v1/androidpublisher-gen.go
index daa43cb..bb09fca 100644
--- a/androidpublisher/v1/androidpublisher-gen.go
+++ b/androidpublisher/v1/androidpublisher-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "androidpublisher:v1"
const apiName = "androidpublisher"
@@ -108,6 +108,7 @@
subscriptionId string
token string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Cancel: Cancels a user's subscription purchase. The subscription
@@ -128,6 +129,14 @@
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 *PurchasesCancelCall) Context(ctx context.Context) *PurchasesCancelCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PurchasesCancelCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -144,6 +153,9 @@
"token": c.token,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -202,6 +214,7 @@
subscriptionId string
token string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Checks whether a user's subscription purchase is valid and
@@ -222,6 +235,14 @@
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 *PurchasesGetCall) Context(ctx context.Context) *PurchasesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PurchasesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -238,6 +259,9 @@
"token": c.token,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/androidpublisher/v2/androidpublisher-gen.go b/androidpublisher/v2/androidpublisher-gen.go
index fedfbbe..6971286 100644
--- a/androidpublisher/v2/androidpublisher-gen.go
+++ b/androidpublisher/v2/androidpublisher-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "androidpublisher:v2"
const apiName = "androidpublisher"
@@ -730,6 +730,7 @@
packageNameid string
editId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Commit: Commits/applies the changes made in this edit back to the
@@ -749,6 +750,14 @@
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 *EditsCommitCall) Context(ctx context.Context) *EditsCommitCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsCommitCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -764,6 +773,9 @@
"editId": c.editId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -821,6 +833,7 @@
packageNameid string
editId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an edit for an app. Creating a new edit will
@@ -841,6 +854,14 @@
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 *EditsDeleteCall) Context(ctx context.Context) *EditsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -856,6 +877,9 @@
"editId": c.editId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -906,6 +930,7 @@
packageNameid string
editId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns information about the edit specified. Calls will fail if
@@ -926,6 +951,14 @@
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 *EditsGetCall) Context(ctx context.Context) *EditsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -941,6 +974,9 @@
"editId": c.editId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -998,6 +1034,7 @@
packageNameid string
appedit *AppEdit
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a new edit for an app, populated with the app's
@@ -1017,6 +1054,14 @@
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 *EditsInsertCall) Context(ctx context.Context) *EditsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.appedit)
@@ -1037,6 +1082,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1090,6 +1138,7 @@
packageNameid string
editId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Validate: Checks that the edit can be successfully committed. The
@@ -1109,6 +1158,14 @@
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 *EditsValidateCall) Context(ctx context.Context) *EditsValidateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsValidateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1124,6 +1181,9 @@
"editId": c.editId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1183,6 +1243,7 @@
apkVersionCode int64
language string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the APK-specific localized listing for a specified
@@ -1204,6 +1265,14 @@
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 *EditsApklistingsDeleteCall) Context(ctx context.Context) *EditsApklistingsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsApklistingsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1221,6 +1290,9 @@
"language": c.language,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1287,6 +1359,7 @@
editId string
apkVersionCode int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Deleteall: Deletes all the APK-specific localized listings for a
@@ -1307,6 +1380,14 @@
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 *EditsApklistingsDeleteallCall) Context(ctx context.Context) *EditsApklistingsDeleteallCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsApklistingsDeleteallCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1323,6 +1404,9 @@
"apkVersionCode": strconv.FormatInt(c.apkVersionCode, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1383,6 +1467,7 @@
apkVersionCode int64
language string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Fetches the APK-specific localized listing for a specified APK
@@ -1404,6 +1489,14 @@
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 *EditsApklistingsGetCall) Context(ctx context.Context) *EditsApklistingsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsApklistingsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1421,6 +1514,9 @@
"language": c.language,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1494,6 +1590,7 @@
editId string
apkVersionCode int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all the APK-specific localized listings for a specified
@@ -1514,6 +1611,14 @@
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 *EditsApklistingsListCall) Context(ctx context.Context) *EditsApklistingsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsApklistingsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1530,6 +1635,9 @@
"apkVersionCode": strconv.FormatInt(c.apkVersionCode, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1598,6 +1706,7 @@
language string
apklisting *ApkListing
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates or creates the APK-specific localized listing for a
@@ -1621,6 +1730,14 @@
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 *EditsApklistingsPatchCall) Context(ctx context.Context) *EditsApklistingsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsApklistingsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.apklisting)
@@ -1644,6 +1761,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1722,6 +1842,7 @@
language string
apklisting *ApkListing
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates or creates the APK-specific localized listing for a
@@ -1744,6 +1865,14 @@
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 *EditsApklistingsUpdateCall) Context(ctx context.Context) *EditsApklistingsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsApklistingsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.apklisting)
@@ -1767,6 +1896,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1843,6 +1975,7 @@
editId string
apksaddexternallyhostedrequest *ApksAddExternallyHostedRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Addexternallyhosted: Creates a new APK without uploading the APK
@@ -1866,6 +1999,14 @@
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 *EditsApksAddexternallyhostedCall) Context(ctx context.Context) *EditsApksAddexternallyhostedCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsApksAddexternallyhostedCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.apksaddexternallyhostedrequest)
@@ -1887,6 +2028,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1947,6 +2091,7 @@
packageNameid string
editId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List:
@@ -1965,6 +2110,14 @@
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 *EditsApksListCall) Context(ctx context.Context) *EditsApksListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsApksListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1980,6 +2133,9 @@
"editId": c.editId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2039,8 +2195,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Upload:
@@ -2059,10 +2215,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *EditsApksUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *EditsApksUploadCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -2087,6 +2245,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *EditsApksUploadCall) Context(ctx context.Context) *EditsApksUploadCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsApksUploadCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2124,6 +2292,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2221,6 +2392,7 @@
packageNameid string
editId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Fetches app details for this edit. This includes the default
@@ -2240,6 +2412,14 @@
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 *EditsDetailsGetCall) Context(ctx context.Context) *EditsDetailsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsDetailsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2255,6 +2435,9 @@
"editId": c.editId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2313,6 +2496,7 @@
editId string
appdetails *AppDetails
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates app details for this edit. This method supports patch
@@ -2333,6 +2517,14 @@
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 *EditsDetailsPatchCall) Context(ctx context.Context) *EditsDetailsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsDetailsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.appdetails)
@@ -2354,6 +2546,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2415,6 +2610,7 @@
editId string
appdetails *AppDetails
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates app details for this edit.
@@ -2434,6 +2630,14 @@
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 *EditsDetailsUpdateCall) Context(ctx context.Context) *EditsDetailsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsDetailsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.appdetails)
@@ -2455,6 +2659,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2517,6 +2724,7 @@
apkVersionCode int64
expansionFileType string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Fetches the Expansion File configuration for the APK specified.
@@ -2537,6 +2745,14 @@
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 *EditsExpansionfilesGetCall) Context(ctx context.Context) *EditsExpansionfilesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsExpansionfilesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2554,6 +2770,9 @@
"expansionFileType": c.expansionFileType,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2636,6 +2855,7 @@
expansionFileType string
expansionfile *ExpansionFile
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates the APK's Expansion File configuration to reference
@@ -2659,6 +2879,14 @@
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 *EditsExpansionfilesPatchCall) Context(ctx context.Context) *EditsExpansionfilesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsExpansionfilesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.expansionfile)
@@ -2682,6 +2910,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2767,6 +2998,7 @@
expansionFileType string
expansionfile *ExpansionFile
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates the APK's Expansion File configuration to reference
@@ -2790,6 +3022,14 @@
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 *EditsExpansionfilesUpdateCall) Context(ctx context.Context) *EditsExpansionfilesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsExpansionfilesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.expansionfile)
@@ -2813,6 +3053,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2900,8 +3143,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Upload: Uploads and attaches a new Expansion File to the APK
@@ -2923,10 +3166,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *EditsExpansionfilesUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *EditsExpansionfilesUploadCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -2951,6 +3196,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *EditsExpansionfilesUploadCall) Context(ctx context.Context) *EditsExpansionfilesUploadCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsExpansionfilesUploadCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2990,6 +3245,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3112,6 +3370,7 @@
imageType string
imageId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the image (specified by id) from the edit.
@@ -3133,6 +3392,14 @@
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 *EditsImagesDeleteCall) Context(ctx context.Context) *EditsImagesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsImagesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3151,6 +3418,9 @@
"imageId": c.imageId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3245,6 +3515,7 @@
language string
imageType string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Deleteall: Deletes all images for the specified language and image
@@ -3266,6 +3537,14 @@
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 *EditsImagesDeleteallCall) Context(ctx context.Context) *EditsImagesDeleteallCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsImagesDeleteallCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3283,6 +3562,9 @@
"imageType": c.imageType,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3377,6 +3659,7 @@
language string
imageType string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all images for the specified language and image type.
@@ -3397,6 +3680,14 @@
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 *EditsImagesListCall) Context(ctx context.Context) *EditsImagesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsImagesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3414,6 +3705,9 @@
"imageType": c.imageType,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3511,8 +3805,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Upload: Uploads a new image and adds it to the list of images for the
@@ -3534,10 +3828,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *EditsImagesUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *EditsImagesUploadCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -3562,6 +3858,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *EditsImagesUploadCall) Context(ctx context.Context) *EditsImagesUploadCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsImagesUploadCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3601,6 +3907,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3734,6 +4043,7 @@
editId string
language string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified localized store listing from an edit.
@@ -3753,6 +4063,14 @@
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 *EditsListingsDeleteCall) Context(ctx context.Context) *EditsListingsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsListingsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3769,6 +4087,9 @@
"language": c.language,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3826,6 +4147,7 @@
packageNameid string
editId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Deleteall: Deletes all localized listings from an edit.
@@ -3844,6 +4166,14 @@
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 *EditsListingsDeleteallCall) Context(ctx context.Context) *EditsListingsDeleteallCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsListingsDeleteallCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3859,6 +4189,9 @@
"editId": c.editId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3910,6 +4243,7 @@
editId string
language string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Fetches information about a localized store listing.
@@ -3929,6 +4263,14 @@
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 *EditsListingsGetCall) Context(ctx context.Context) *EditsListingsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsListingsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3945,6 +4287,9 @@
"language": c.language,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4009,6 +4354,7 @@
packageNameid string
editId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns all of the localized store listings attached to this
@@ -4028,6 +4374,14 @@
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 *EditsListingsListCall) Context(ctx context.Context) *EditsListingsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsListingsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4043,6 +4397,9 @@
"editId": c.editId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4102,6 +4459,7 @@
language string
listing *Listing
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Creates or updates a localized store listing. This method
@@ -4123,6 +4481,14 @@
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 *EditsListingsPatchCall) Context(ctx context.Context) *EditsListingsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsListingsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.listing)
@@ -4145,6 +4511,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4214,6 +4583,7 @@
language string
listing *Listing
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Creates or updates a localized store listing.
@@ -4234,6 +4604,14 @@
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 *EditsListingsUpdateCall) Context(ctx context.Context) *EditsListingsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsListingsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.listing)
@@ -4256,6 +4634,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4324,6 +4705,7 @@
editId string
track string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get:
@@ -4343,6 +4725,14 @@
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 *EditsTestersGetCall) Context(ctx context.Context) *EditsTestersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsTestersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4359,6 +4749,9 @@
"track": c.track,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4435,6 +4828,7 @@
track string
testers *Testers
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch:
@@ -4455,6 +4849,14 @@
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 *EditsTestersPatchCall) Context(ctx context.Context) *EditsTestersPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsTestersPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.testers)
@@ -4477,6 +4879,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4556,6 +4961,7 @@
track string
testers *Testers
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update:
@@ -4576,6 +4982,14 @@
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 *EditsTestersUpdateCall) Context(ctx context.Context) *EditsTestersUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsTestersUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.testers)
@@ -4598,6 +5012,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4676,6 +5093,7 @@
editId string
track string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Fetches the track configuration for the specified track type.
@@ -4696,6 +5114,14 @@
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 *EditsTracksGetCall) Context(ctx context.Context) *EditsTracksGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsTracksGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4712,6 +5138,9 @@
"track": c.track,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4788,6 +5217,7 @@
packageNameid string
editId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all the track configurations for this edit.
@@ -4806,6 +5236,14 @@
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 *EditsTracksListCall) Context(ctx context.Context) *EditsTracksListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsTracksListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4821,6 +5259,9 @@
"editId": c.editId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4880,6 +5321,7 @@
track string
track2 *Track
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates the track configuration for the specified track type.
@@ -4903,6 +5345,14 @@
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 *EditsTracksPatchCall) Context(ctx context.Context) *EditsTracksPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsTracksPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.track2)
@@ -4925,6 +5375,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5006,6 +5459,7 @@
track string
track2 *Track
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates the track configuration for the specified track type.
@@ -5028,6 +5482,14 @@
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 *EditsTracksUpdateCall) Context(ctx context.Context) *EditsTracksUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EditsTracksUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.track2)
@@ -5050,6 +5512,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5128,6 +5593,7 @@
s *Service
packageName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the user's current inapp item or subscription
@@ -5172,6 +5638,14 @@
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 *EntitlementsListCall) Context(ctx context.Context) *EntitlementsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EntitlementsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5198,6 +5672,9 @@
"packageName": c.packageName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5263,6 +5740,7 @@
s *Service
inappproductsbatchrequest *InappproductsBatchRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Batch:
@@ -5280,6 +5758,14 @@
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 *InappproductsBatchCall) Context(ctx context.Context) *InappproductsBatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InappproductsBatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.inappproductsbatchrequest)
@@ -5298,6 +5784,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5339,6 +5828,7 @@
packageNameid string
skuid string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete an in-app product for an app.
@@ -5357,6 +5847,14 @@
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 *InappproductsDeleteCall) Context(ctx context.Context) *InappproductsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InappproductsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5372,6 +5870,9 @@
"sku": c.skuid,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5422,6 +5923,7 @@
packageName string
skuid string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns information about the in-app product specified.
@@ -5440,6 +5942,14 @@
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 *InappproductsGetCall) Context(ctx context.Context) *InappproductsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InappproductsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5455,6 +5965,9 @@
"sku": c.skuid,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5511,6 +6024,7 @@
packageNameid string
inappproduct *InAppProduct
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a new in-app product for an app.
@@ -5539,6 +6053,14 @@
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 *InappproductsInsertCall) Context(ctx context.Context) *InappproductsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InappproductsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.inappproduct)
@@ -5562,6 +6084,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5619,6 +6144,7 @@
s *Service
packageNameid string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all the in-app products for an Android app, both
@@ -5655,6 +6181,14 @@
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 *InappproductsListCall) Context(ctx context.Context) *InappproductsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InappproductsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5678,6 +6212,9 @@
"packageName": c.packageNameid,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5743,6 +6280,7 @@
skuid string
inappproduct *InAppProduct
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates the details of an in-app product. This method supports
@@ -5773,6 +6311,14 @@
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 *InappproductsPatchCall) Context(ctx context.Context) *InappproductsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InappproductsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.inappproduct)
@@ -5797,6 +6343,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5863,6 +6412,7 @@
skuid string
inappproduct *InAppProduct
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates the details of an in-app product.
@@ -5892,6 +6442,14 @@
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 *InappproductsUpdateCall) Context(ctx context.Context) *InappproductsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InappproductsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.inappproduct)
@@ -5916,6 +6474,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5982,6 +6543,7 @@
productId string
token string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Checks the purchase and consumption status of an inapp item.
@@ -6001,6 +6563,14 @@
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 *PurchasesProductsGetCall) Context(ctx context.Context) *PurchasesProductsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PurchasesProductsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6017,6 +6587,9 @@
"token": c.token,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6082,6 +6655,7 @@
subscriptionId string
token string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Cancel: Cancels a user's subscription purchase. The subscription
@@ -6102,6 +6676,14 @@
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 *PurchasesSubscriptionsCancelCall) Context(ctx context.Context) *PurchasesSubscriptionsCancelCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PurchasesSubscriptionsCancelCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6118,6 +6700,9 @@
"token": c.token,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6177,6 +6762,7 @@
token string
subscriptionpurchasesdeferrequest *SubscriptionPurchasesDeferRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Defer: Defers a user's subscription purchase until a specified future
@@ -6198,6 +6784,14 @@
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 *PurchasesSubscriptionsDeferCall) Context(ctx context.Context) *PurchasesSubscriptionsDeferCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PurchasesSubscriptionsDeferCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.subscriptionpurchasesdeferrequest)
@@ -6220,6 +6814,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6288,6 +6885,7 @@
subscriptionId string
token string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Checks whether a user's subscription purchase is valid and
@@ -6308,6 +6906,14 @@
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 *PurchasesSubscriptionsGetCall) Context(ctx context.Context) *PurchasesSubscriptionsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PurchasesSubscriptionsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6324,6 +6930,9 @@
"token": c.token,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6389,6 +6998,7 @@
subscriptionId string
token string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Refund: Refunds a user's subscription purchase, but the subscription
@@ -6410,6 +7020,14 @@
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 *PurchasesSubscriptionsRefundCall) Context(ctx context.Context) *PurchasesSubscriptionsRefundCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PurchasesSubscriptionsRefundCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6426,6 +7044,9 @@
"token": c.token,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6484,6 +7105,7 @@
subscriptionId string
token string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Revoke: Refunds and immediately revokes a user's subscription
@@ -6505,6 +7127,14 @@
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 *PurchasesSubscriptionsRevokeCall) Context(ctx context.Context) *PurchasesSubscriptionsRevokeCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PurchasesSubscriptionsRevokeCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6521,6 +7151,9 @@
"token": c.token,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/appengine/v1beta4/appengine-gen.go b/appengine/v1beta4/appengine-gen.go
index fc352f2..dbb96ca 100644
--- a/appengine/v1beta4/appengine-gen.go
+++ b/appengine/v1beta4/appengine-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "appengine:v1beta4"
const apiName = "appengine"
@@ -969,6 +969,7 @@
s *Service
appsId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets information about an application.
@@ -997,6 +998,14 @@
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 *AppsGetCall) Context(ctx context.Context) *AppsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AppsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1014,6 +1023,9 @@
"appsId": c.appsId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1069,6 +1081,7 @@
appsId string
modulesId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a module and all enclosed versions.
@@ -1087,6 +1100,14 @@
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 *AppsModulesDeleteCall) Context(ctx context.Context) *AppsModulesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AppsModulesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1102,6 +1123,9 @@
"modulesId": c.modulesId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1159,6 +1183,7 @@
appsId string
modulesId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the current configuration of the module.
@@ -1177,6 +1202,14 @@
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 *AppsModulesGetCall) Context(ctx context.Context) *AppsModulesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AppsModulesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1192,6 +1225,9 @@
"modulesId": c.modulesId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1248,6 +1284,7 @@
s *Service
appsId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all the modules in the application.
@@ -1279,6 +1316,14 @@
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 *AppsModulesListCall) Context(ctx context.Context) *AppsModulesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AppsModulesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1299,6 +1344,9 @@
"appsId": c.appsId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1361,6 +1409,7 @@
modulesId string
module *Module
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates the configuration of the specified module.
@@ -1395,6 +1444,14 @@
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 *AppsModulesPatchCall) Context(ctx context.Context) *AppsModulesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AppsModulesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.module)
@@ -1422,6 +1479,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1493,6 +1553,7 @@
modulesId string
version *Version
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Deploys new code and resource files to a version.
@@ -1512,6 +1573,14 @@
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 *AppsModulesVersionsCreateCall) Context(ctx context.Context) *AppsModulesVersionsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AppsModulesVersionsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.version)
@@ -1533,6 +1602,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1594,6 +1666,7 @@
modulesId string
versionsId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing version.
@@ -1613,6 +1686,14 @@
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 *AppsModulesVersionsDeleteCall) Context(ctx context.Context) *AppsModulesVersionsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AppsModulesVersionsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1629,6 +1710,9 @@
"versionsId": c.versionsId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1694,6 +1778,7 @@
modulesId string
versionsId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets application deployment information.
@@ -1724,6 +1809,14 @@
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 *AppsModulesVersionsGetCall) Context(ctx context.Context) *AppsModulesVersionsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AppsModulesVersionsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1743,6 +1836,9 @@
"versionsId": c.versionsId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1816,6 +1912,7 @@
appsId string
modulesId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the versions of a module.
@@ -1859,6 +1956,14 @@
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 *AppsModulesVersionsListCall) Context(ctx context.Context) *AppsModulesVersionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AppsModulesVersionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1883,6 +1988,9 @@
"modulesId": c.modulesId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1960,6 +2068,7 @@
appsId string
operationsId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the latest state of a long-running operation. Clients can
@@ -1980,6 +2089,14 @@
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 *AppsOperationsGetCall) Context(ctx context.Context) *AppsOperationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AppsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1995,6 +2112,9 @@
"operationsId": c.operationsId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2051,6 +2171,7 @@
s *Service
appsId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists operations that match the specified filter in the
@@ -2093,6 +2214,14 @@
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 *AppsOperationsListCall) Context(ctx context.Context) *AppsOperationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AppsOperationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2116,6 +2245,9 @@
"appsId": c.appsId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/appsactivity/v1/appsactivity-gen.go b/appsactivity/v1/appsactivity-gen.go
index 9c9bcfe..5b76a49 100644
--- a/appsactivity/v1/appsactivity-gen.go
+++ b/appsactivity/v1/appsactivity-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "appsactivity:v1"
const apiName = "appsactivity"
@@ -297,6 +297,7 @@
type ActivitiesListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns a list of activities visible to the current logged in
@@ -376,6 +377,14 @@
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 *ActivitiesListCall) Context(ctx context.Context) *ActivitiesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ActivitiesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -409,6 +418,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/appstate/v1/appstate-gen.go b/appstate/v1/appstate-gen.go
index 1e68e5e..336737f 100644
--- a/appstate/v1/appstate-gen.go
+++ b/appstate/v1/appstate-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "appstate:v1"
const apiName = "appstate"
@@ -142,6 +142,7 @@
s *Service
stateKey int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Clear: Clears (sets to empty) the data for the passed key if and only
@@ -169,6 +170,14 @@
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 *StatesClearCall) Context(ctx context.Context) *StatesClearCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *StatesClearCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -186,6 +195,9 @@
"stateKey": strconv.FormatInt(c.stateKey, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -243,6 +255,7 @@
s *Service
stateKey int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a key and the data associated with it. The key is
@@ -265,6 +278,14 @@
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 *StatesDeleteCall) Context(ctx context.Context) *StatesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *StatesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -279,6 +300,9 @@
"stateKey": strconv.FormatInt(c.stateKey, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -324,6 +348,7 @@
s *Service
stateKey int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves the data corresponding to the passed key. If the key
@@ -342,6 +367,14 @@
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 *StatesGetCall) Context(ctx context.Context) *StatesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *StatesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -356,6 +389,9 @@
"stateKey": strconv.FormatInt(c.stateKey, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -407,6 +443,7 @@
type StatesListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all the states keys, and optionally the state data.
@@ -430,6 +467,14 @@
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 *StatesListCall) Context(ctx context.Context) *StatesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *StatesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -445,6 +490,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -492,6 +540,7 @@
stateKey int64
updaterequest *UpdateRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Update the data associated with the input key if and only if
@@ -524,6 +573,14 @@
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 *StatesUpdateCall) Context(ctx context.Context) *StatesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *StatesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.updaterequest)
@@ -547,6 +604,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/autoscaler/v1beta2/autoscaler-gen.go b/autoscaler/v1beta2/autoscaler-gen.go
index 10339df..7272f04 100644
--- a/autoscaler/v1beta2/autoscaler-gen.go
+++ b/autoscaler/v1beta2/autoscaler-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "autoscaler:v1beta2"
const apiName = "autoscaler"
@@ -383,6 +383,7 @@
zone string
autoscaler string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified Autoscaler resource.
@@ -402,6 +403,14 @@
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 *AutoscalersDeleteCall) Context(ctx context.Context) *AutoscalersDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -418,6 +427,9 @@
"autoscaler": c.autoscaler,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -483,6 +495,7 @@
zone string
autoscaler string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the specified Autoscaler resource.
@@ -502,6 +515,14 @@
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 *AutoscalersGetCall) Context(ctx context.Context) *AutoscalersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AutoscalersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -518,6 +539,9 @@
"autoscaler": c.autoscaler,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -584,6 +608,7 @@
zone string
autoscaler *Autoscaler
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Adds new Autoscaler resource.
@@ -603,6 +628,14 @@
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 *AutoscalersInsertCall) Context(ctx context.Context) *AutoscalersInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AutoscalersInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler)
@@ -624,6 +657,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -684,6 +720,7 @@
project string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all Autoscaler resources in this zone.
@@ -720,6 +757,14 @@
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 *AutoscalersListCall) Context(ctx context.Context) *AutoscalersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AutoscalersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -744,6 +789,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -820,6 +868,7 @@
autoscaler string
autoscaler2 *Autoscaler
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Update the entire content of the Autoscaler resource. This
@@ -841,6 +890,14 @@
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 *AutoscalersPatchCall) Context(ctx context.Context) *AutoscalersPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AutoscalersPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler2)
@@ -863,6 +920,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -932,6 +992,7 @@
autoscaler string
autoscaler2 *Autoscaler
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Update the entire content of the Autoscaler resource.
@@ -952,6 +1013,14 @@
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 *AutoscalersUpdateCall) Context(ctx context.Context) *AutoscalersUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler2)
@@ -974,6 +1043,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1042,6 +1114,7 @@
zone string
operation string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified zone-specific operation resource.
@@ -1061,6 +1134,14 @@
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 *ZoneOperationsDeleteCall) Context(ctx context.Context) *ZoneOperationsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZoneOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1077,6 +1158,9 @@
"operation": c.operation,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1135,6 +1219,7 @@
zone string
operation string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves the specified zone-specific operation resource.
@@ -1154,6 +1239,14 @@
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 *ZoneOperationsGetCall) Context(ctx context.Context) *ZoneOperationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1170,6 +1263,9 @@
"operation": c.operation,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1235,6 +1331,7 @@
project string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of operation resources contained within the
@@ -1272,6 +1369,14 @@
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 *ZoneOperationsListCall) Context(ctx context.Context) *ZoneOperationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZoneOperationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1296,6 +1401,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1369,6 +1477,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List:
@@ -1404,6 +1513,14 @@
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 *ZonesListCall) Context(ctx context.Context) *ZonesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZonesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1427,6 +1544,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/bigquery/v2/bigquery-gen.go b/bigquery/v2/bigquery-gen.go
index b5206ee..cba1c3a 100644
--- a/bigquery/v2/bigquery-gen.go
+++ b/bigquery/v2/bigquery-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "bigquery:v2"
const apiName = "bigquery"
@@ -1342,6 +1342,7 @@
projectId string
datasetId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the dataset specified by the datasetId value. Before
@@ -1371,6 +1372,14 @@
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 *DatasetsDeleteCall) Context(ctx context.Context) *DatasetsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1389,6 +1398,9 @@
"datasetId": c.datasetId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1445,6 +1457,7 @@
projectId string
datasetId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the dataset specified by datasetID.
@@ -1463,6 +1476,14 @@
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 *DatasetsGetCall) Context(ctx context.Context) *DatasetsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1478,6 +1499,9 @@
"datasetId": c.datasetId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1537,6 +1561,7 @@
projectId string
dataset *Dataset
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a new empty dataset.
@@ -1555,6 +1580,14 @@
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 *DatasetsInsertCall) Context(ctx context.Context) *DatasetsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.dataset)
@@ -1575,6 +1608,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1628,6 +1664,7 @@
s *Service
projectId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all datasets in the specified project to which you have
@@ -1667,6 +1704,14 @@
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 *DatasetsListCall) Context(ctx context.Context) *DatasetsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1690,6 +1735,9 @@
"projectId": c.projectId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1759,6 +1807,7 @@
datasetId string
dataset *Dataset
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates information in an existing dataset. The update method
@@ -1781,6 +1830,14 @@
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 *DatasetsPatchCall) Context(ctx context.Context) *DatasetsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.dataset)
@@ -1802,6 +1859,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1864,6 +1924,7 @@
datasetId string
dataset *Dataset
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates information in an existing dataset. The update method
@@ -1885,6 +1946,14 @@
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 *DatasetsUpdateCall) Context(ctx context.Context) *DatasetsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.dataset)
@@ -1906,6 +1975,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1967,6 +2039,7 @@
projectId string
jobId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Cancel: Requests that a job be cancelled. This call will return
@@ -1988,6 +2061,14 @@
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 *JobsCancelCall) Context(ctx context.Context) *JobsCancelCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *JobsCancelCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2003,6 +2084,9 @@
"jobId": c.jobId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2061,6 +2145,7 @@
projectId string
jobId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns information about a specific job. Job information is
@@ -2081,6 +2166,14 @@
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 *JobsGetCall) Context(ctx context.Context) *JobsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *JobsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2096,6 +2189,9 @@
"jobId": c.jobId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2155,6 +2251,7 @@
projectId string
jobId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetQueryResults: Retrieves the results of a query job.
@@ -2203,6 +2300,14 @@
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 *JobsGetQueryResultsCall) Context(ctx context.Context) *JobsGetQueryResultsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *JobsGetQueryResultsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2230,6 +2335,9 @@
"jobId": c.jobId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2315,8 +2423,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Insert: Starts a new asynchronous job. Requires the Can View project
@@ -2336,10 +2444,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *JobsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *JobsInsertCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -2364,6 +2474,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *JobsInsertCall) Context(ctx context.Context) *JobsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *JobsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.job)
@@ -2403,6 +2523,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2498,6 +2621,7 @@
s *Service
projectId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all jobs that you started in the specified project. Job
@@ -2563,6 +2687,14 @@
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 *JobsListCall) Context(ctx context.Context) *JobsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *JobsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2592,6 +2724,9 @@
"projectId": c.projectId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2689,6 +2824,7 @@
projectId string
queryrequest *QueryRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Query: Runs a BigQuery SQL query synchronously and returns query
@@ -2708,6 +2844,14 @@
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 *JobsQueryCall) Context(ctx context.Context) *JobsQueryCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *JobsQueryCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.queryrequest)
@@ -2728,6 +2872,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2781,6 +2928,7 @@
type ProjectsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all projects to which you have been granted any project
@@ -2812,6 +2960,14 @@
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 *ProjectsListCall) Context(ctx context.Context) *ProjectsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2830,6 +2986,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2886,6 +3045,7 @@
tableId string
tabledatainsertallrequest *TableDataInsertAllRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// InsertAll: Streams data into BigQuery one record at a time without
@@ -2907,6 +3067,14 @@
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 *TabledataInsertAllCall) Context(ctx context.Context) *TabledataInsertAllCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TabledataInsertAllCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.tabledatainsertallrequest)
@@ -2929,6 +3097,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2999,6 +3170,7 @@
datasetId string
tableId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves table data from a specified set of rows. Requires the
@@ -3040,6 +3212,14 @@
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 *TabledataListCall) Context(ctx context.Context) *TabledataListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TabledataListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3065,6 +3245,9 @@
"tableId": c.tableId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3149,6 +3332,7 @@
datasetId string
tableId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the table specified by tableId from the dataset. If
@@ -3169,6 +3353,14 @@
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 *TablesDeleteCall) Context(ctx context.Context) *TablesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3185,6 +3377,9 @@
"tableId": c.tableId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3244,6 +3439,7 @@
datasetId string
tableId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the specified table resource by table ID. This method does
@@ -3265,6 +3461,14 @@
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 *TablesGetCall) Context(ctx context.Context) *TablesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3281,6 +3485,9 @@
"tableId": c.tableId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3348,6 +3555,7 @@
datasetId string
table *Table
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a new, empty table in the dataset.
@@ -3367,6 +3575,14 @@
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 *TablesInsertCall) Context(ctx context.Context) *TablesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.table)
@@ -3388,6 +3604,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3449,6 +3668,7 @@
projectId string
datasetId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all tables in the specified dataset. Requires the READER
@@ -3482,6 +3702,14 @@
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 *TablesListCall) Context(ctx context.Context) *TablesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3503,6 +3731,9 @@
"datasetId": c.datasetId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3575,6 +3806,7 @@
tableId string
table *Table
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates information in an existing table. The update method
@@ -3598,6 +3830,14 @@
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 *TablesPatchCall) Context(ctx context.Context) *TablesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.table)
@@ -3620,6 +3860,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3690,6 +3933,7 @@
tableId string
table *Table
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates information in an existing table. The update method
@@ -3712,6 +3956,14 @@
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 *TablesUpdateCall) Context(ctx context.Context) *TablesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.table)
@@ -3734,6 +3986,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/blogger/v2/blogger-gen.go b/blogger/v2/blogger-gen.go
index b1606de..bbbc614 100644
--- a/blogger/v2/blogger-gen.go
+++ b/blogger/v2/blogger-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "blogger:v2"
const apiName = "blogger"
@@ -514,6 +514,7 @@
s *Service
blogId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one blog by id.
@@ -531,6 +532,14 @@
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 *BlogsGetCall) Context(ctx context.Context) *BlogsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BlogsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -545,6 +554,9 @@
"blogId": c.blogId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -596,6 +608,7 @@
postId string
commentId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one comment by id.
@@ -615,6 +628,14 @@
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 *CommentsGetCall) Context(ctx context.Context) *CommentsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -631,6 +652,9 @@
"commentId": c.commentId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -695,6 +719,7 @@
blogId string
postId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the comments for a blog, possibly filtered.
@@ -741,6 +766,14 @@
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 *CommentsListCall) Context(ctx context.Context) *CommentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -768,6 +801,9 @@
"postId": c.postId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -847,6 +883,7 @@
blogId string
pageId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one blog page by id.
@@ -865,6 +902,14 @@
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 *PagesGetCall) Context(ctx context.Context) *PagesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PagesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -880,6 +925,9 @@
"pageId": c.pageId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -936,6 +984,7 @@
s *Service
blogId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves pages for a blog, possibly filtered.
@@ -960,6 +1009,14 @@
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 *PagesListCall) Context(ctx context.Context) *PagesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PagesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -977,6 +1034,9 @@
"blogId": c.blogId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1032,6 +1092,7 @@
blogId string
postId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get a post by id.
@@ -1050,6 +1111,14 @@
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 *PostsGetCall) Context(ctx context.Context) *PostsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1065,6 +1134,9 @@
"postId": c.postId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1121,6 +1193,7 @@
s *Service
blogId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of posts, possibly filtered.
@@ -1166,6 +1239,14 @@
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 *PostsListCall) Context(ctx context.Context) *PostsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1192,6 +1273,9 @@
"blogId": c.blogId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1263,6 +1347,7 @@
s *Service
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one user by id.
@@ -1280,6 +1365,14 @@
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 *UsersGetCall) Context(ctx context.Context) *UsersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1294,6 +1387,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1343,6 +1439,7 @@
s *Service
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of blogs, possibly filtered.
@@ -1360,6 +1457,14 @@
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 *UsersBlogsListCall) Context(ctx context.Context) *UsersBlogsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersBlogsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1374,6 +1479,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/blogger/v3/blogger-gen.go b/blogger/v3/blogger-gen.go
index 975fec0..e10eaa4 100644
--- a/blogger/v3/blogger-gen.go
+++ b/blogger/v3/blogger-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "blogger:v3"
const apiName = "blogger"
@@ -711,6 +711,7 @@
userId string
blogId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one blog and user info pair by blogId and userId.
@@ -736,6 +737,14 @@
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 *BlogUserInfosGetCall) Context(ctx context.Context) *BlogUserInfosGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BlogUserInfosGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -754,6 +763,9 @@
"blogId": c.blogId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -817,6 +829,7 @@
s *Service
blogId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one blog by ID.
@@ -853,6 +866,14 @@
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 *BlogsGetCall) Context(ctx context.Context) *BlogsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BlogsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -873,6 +894,9 @@
"blogId": c.blogId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -944,6 +968,7 @@
s *Service
url string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetByUrl: Retrieve a Blog by URL.
@@ -973,6 +998,14 @@
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 *BlogsGetByUrlCall) Context(ctx context.Context) *BlogsGetByUrlCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BlogsGetByUrlCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -989,6 +1022,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1054,6 +1090,7 @@
s *Service
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ListByUser: Retrieves a list of blogs, possibly filtered.
@@ -1119,6 +1156,14 @@
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 *BlogsListByUserCall) Context(ctx context.Context) *BlogsListByUserCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BlogsListByUserCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1145,6 +1190,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1248,6 +1296,7 @@
postId string
commentId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Approve: Marks a comment as not spam.
@@ -1267,6 +1316,14 @@
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 *CommentsApproveCall) Context(ctx context.Context) *CommentsApproveCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsApproveCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1283,6 +1340,9 @@
"commentId": c.commentId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1348,6 +1408,7 @@
postId string
commentId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a comment by ID.
@@ -1367,6 +1428,14 @@
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 *CommentsDeleteCall) Context(ctx context.Context) *CommentsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1383,6 +1452,9 @@
"commentId": c.commentId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1441,6 +1513,7 @@
postId string
commentId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one comment by ID.
@@ -1475,6 +1548,14 @@
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 *CommentsGetCall) Context(ctx context.Context) *CommentsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1494,6 +1575,9 @@
"commentId": c.commentId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1574,6 +1658,7 @@
blogId string
postId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the comments for a post, possibly filtered.
@@ -1652,6 +1737,14 @@
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 *CommentsListCall) Context(ctx context.Context) *CommentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1688,6 +1781,9 @@
"postId": c.postId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1805,6 +1901,7 @@
s *Service
blogId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ListByBlog: Retrieves the comments for a blog, across all posts,
@@ -1870,6 +1967,14 @@
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 *CommentsListByBlogCall) Context(ctx context.Context) *CommentsListByBlogCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsListByBlogCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1902,6 +2007,9 @@
"blogId": c.blogId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1999,6 +2107,7 @@
postId string
commentId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// MarkAsSpam: Marks a comment as spam.
@@ -2018,6 +2127,14 @@
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 *CommentsMarkAsSpamCall) Context(ctx context.Context) *CommentsMarkAsSpamCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsMarkAsSpamCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2034,6 +2151,9 @@
"commentId": c.commentId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2099,6 +2219,7 @@
postId string
commentId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// RemoveContent: Removes the content of a comment.
@@ -2118,6 +2239,14 @@
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 *CommentsRemoveContentCall) Context(ctx context.Context) *CommentsRemoveContentCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsRemoveContentCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2134,6 +2263,9 @@
"commentId": c.commentId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2197,6 +2329,7 @@
s *Service
blogId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieve pageview stats for a Blog.
@@ -2225,6 +2358,14 @@
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 *PageViewsGetCall) Context(ctx context.Context) *PageViewsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PageViewsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2242,6 +2383,9 @@
"blogId": c.blogId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2307,6 +2451,7 @@
blogId string
pageId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a page by ID.
@@ -2325,6 +2470,14 @@
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 *PagesDeleteCall) Context(ctx context.Context) *PagesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PagesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2340,6 +2493,9 @@
"pageId": c.pageId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2390,6 +2546,7 @@
blogId string
pageId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one blog page by ID.
@@ -2419,6 +2576,14 @@
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 *PagesGetCall) Context(ctx context.Context) *PagesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PagesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2437,6 +2602,9 @@
"pageId": c.pageId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2509,6 +2677,7 @@
blogId string
page *Page
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Add a page.
@@ -2534,6 +2703,14 @@
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 *PagesInsertCall) Context(ctx context.Context) *PagesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PagesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.page)
@@ -2557,6 +2734,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2614,6 +2794,7 @@
s *Service
blogId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the pages for a blog, optionally including non-LIVE
@@ -2676,6 +2857,14 @@
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 *PagesListCall) Context(ctx context.Context) *PagesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PagesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2705,6 +2894,9 @@
"blogId": c.blogId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2801,6 +2993,7 @@
pageId string
page *Page
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Update a page. This method supports patch semantics.
@@ -2834,6 +3027,14 @@
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 *PagesPatchCall) Context(ctx context.Context) *PagesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PagesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.page)
@@ -2861,6 +3062,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2931,6 +3135,7 @@
blogId string
pageId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Publish: Publishes a draft page.
@@ -2949,6 +3154,14 @@
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 *PagesPublishCall) Context(ctx context.Context) *PagesPublishCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PagesPublishCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2964,6 +3177,9 @@
"pageId": c.pageId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3021,6 +3237,7 @@
blogId string
pageId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Revert: Revert a published or scheduled page to draft state.
@@ -3039,6 +3256,14 @@
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 *PagesRevertCall) Context(ctx context.Context) *PagesRevertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PagesRevertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3054,6 +3279,9 @@
"pageId": c.pageId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3112,6 +3340,7 @@
pageId string
page *Page
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Update a page.
@@ -3145,6 +3374,14 @@
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 *PagesUpdateCall) Context(ctx context.Context) *PagesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PagesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.page)
@@ -3172,6 +3409,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3243,6 +3483,7 @@
blogId string
postId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one post and user info pair, by post ID and user ID. The
@@ -3271,6 +3512,14 @@
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 *PostUserInfosGetCall) Context(ctx context.Context) *PostUserInfosGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostUserInfosGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3290,6 +3539,9 @@
"postId": c.postId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3361,6 +3613,7 @@
userId string
blogId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of post and post user info pairs, possibly
@@ -3458,6 +3711,14 @@
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 *PostUserInfosListCall) Context(ctx context.Context) *PostUserInfosListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostUserInfosListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3500,6 +3761,9 @@
"blogId": c.blogId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3636,6 +3900,7 @@
blogId string
postId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a post by ID.
@@ -3654,6 +3919,14 @@
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 *PostsDeleteCall) Context(ctx context.Context) *PostsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3669,6 +3942,9 @@
"postId": c.postId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3719,6 +3995,7 @@
blogId string
postId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get a post by ID.
@@ -3773,6 +4050,14 @@
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 *PostsGetCall) Context(ctx context.Context) *PostsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3800,6 +4085,9 @@
"postId": c.postId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3890,6 +4178,7 @@
blogId string
path string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetByPath: Retrieve a Post by Path.
@@ -3928,6 +4217,14 @@
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 *PostsGetByPathCall) Context(ctx context.Context) *PostsGetByPathCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsGetByPathCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3949,6 +4246,9 @@
"blogId": c.blogId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4028,6 +4328,7 @@
blogId string
post *Post
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Add a post.
@@ -4068,6 +4369,14 @@
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 *PostsInsertCall) Context(ctx context.Context) *PostsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.post)
@@ -4097,6 +4406,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4165,6 +4477,7 @@
s *Service
blogId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of posts, possibly filtered.
@@ -4268,6 +4581,14 @@
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 *PostsListCall) Context(ctx context.Context) *PostsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4312,6 +4633,9 @@
"blogId": c.blogId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4448,6 +4772,7 @@
postId string
post *Post
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Update a post. This method supports patch semantics.
@@ -4503,6 +4828,14 @@
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 *PostsPatchCall) Context(ctx context.Context) *PostsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.post)
@@ -4539,6 +4872,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4626,6 +4962,7 @@
blogId string
postId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Publish: Publishes a draft post, optionally at the specific time of
@@ -4655,6 +4992,14 @@
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 *PostsPublishCall) Context(ctx context.Context) *PostsPublishCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsPublishCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4673,6 +5018,9 @@
"postId": c.postId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4736,6 +5084,7 @@
blogId string
postId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Revert: Revert a published or scheduled post to draft state.
@@ -4754,6 +5103,14 @@
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 *PostsRevertCall) Context(ctx context.Context) *PostsRevertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsRevertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4769,6 +5126,9 @@
"postId": c.postId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4826,6 +5186,7 @@
blogId string
q string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Search: Search for a post.
@@ -4863,6 +5224,14 @@
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 *PostsSearchCall) Context(ctx context.Context) *PostsSearchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsSearchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4884,6 +5253,9 @@
"blogId": c.blogId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4963,6 +5335,7 @@
postId string
post *Post
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Update a post.
@@ -5018,6 +5391,14 @@
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 *PostsUpdateCall) Context(ctx context.Context) *PostsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.post)
@@ -5054,6 +5435,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5140,6 +5524,7 @@
s *Service
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one user by ID.
@@ -5157,6 +5542,14 @@
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 *UsersGetCall) Context(ctx context.Context) *UsersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5171,6 +5564,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/books/v1/books-gen.go b/books/v1/books-gen.go
index e5667ee..c0bd22f 100644
--- a/books/v1/books-gen.go
+++ b/books/v1/books-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "books:v1"
const apiName = "books"
@@ -1710,6 +1710,7 @@
userId string
shelf string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves metadata for a specific bookshelf for the specified
@@ -1736,6 +1737,14 @@
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 *BookshelvesGetCall) Context(ctx context.Context) *BookshelvesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BookshelvesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1754,6 +1763,9 @@
"shelf": c.shelf,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1815,6 +1827,7 @@
s *Service
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of public bookshelves for the specified user.
@@ -1839,6 +1852,14 @@
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 *BookshelvesListCall) Context(ctx context.Context) *BookshelvesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BookshelvesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1856,6 +1877,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1911,6 +1935,7 @@
userId string
shelf string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves volumes in a specific bookshelf for the specified
@@ -1958,6 +1983,14 @@
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 *BookshelvesVolumesListCall) Context(ctx context.Context) *BookshelvesVolumesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BookshelvesVolumesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1985,6 +2018,9 @@
"shelf": c.shelf,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2064,6 +2100,7 @@
type CloudloadingAddBookCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AddBook:
@@ -2107,6 +2144,14 @@
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 *CloudloadingAddBookCall) Context(ctx context.Context) *CloudloadingAddBookCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CloudloadingAddBookCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2131,6 +2176,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2190,6 +2238,7 @@
s *Service
volumeId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// DeleteBook: Remove the book and its contents
@@ -2207,6 +2256,14 @@
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 *CloudloadingDeleteBookCall) Context(ctx context.Context) *CloudloadingDeleteBookCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CloudloadingDeleteBookCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2220,6 +2277,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2262,6 +2322,7 @@
s *Service
bookscloudloadingresource *BooksCloudloadingResource
opt_ map[string]interface{}
+ ctx_ context.Context
}
// UpdateBook:
@@ -2279,6 +2340,14 @@
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 *CloudloadingUpdateBookCall) Context(ctx context.Context) *CloudloadingUpdateBookCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CloudloadingUpdateBookCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.bookscloudloadingresource)
@@ -2297,6 +2366,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2338,6 +2410,7 @@
s *Service
cpksver string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ListOfflineMetadata: Returns a list of offline dictionary meatadata
@@ -2356,6 +2429,14 @@
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 *DictionaryListOfflineMetadataCall) Context(ctx context.Context) *DictionaryListOfflineMetadataCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DictionaryListOfflineMetadataCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2369,6 +2450,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2419,6 +2503,7 @@
volumeId string
summaryId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the layer summary for a volume.
@@ -2451,6 +2536,14 @@
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 *LayersGetCall) Context(ctx context.Context) *LayersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2472,6 +2565,9 @@
"summaryId": c.summaryId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2538,6 +2634,7 @@
s *Service
volumeId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List the layer summaries for a volume.
@@ -2583,6 +2680,14 @@
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 *LayersListCall) Context(ctx context.Context) *LayersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2609,6 +2714,9 @@
"volumeId": c.volumeId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2684,6 +2792,7 @@
annotationDataId string
contentVersion string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the annotation data.
@@ -2748,6 +2857,14 @@
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 *LayersAnnotationDataGetCall) Context(ctx context.Context) *LayersAnnotationDataGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersAnnotationDataGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2783,6 +2900,9 @@
"annotationDataId": c.annotationDataId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2889,6 +3009,7 @@
layerId string
contentVersion string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Gets the annotation data for a volume and layer.
@@ -2982,6 +3103,14 @@
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 *LayersAnnotationDataListCall) Context(ctx context.Context) *LayersAnnotationDataListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersAnnotationDataListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3028,6 +3157,9 @@
"layerId": c.layerId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3151,6 +3283,7 @@
layerId string
annotationId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the volume annotation.
@@ -3185,6 +3318,14 @@
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 *LayersVolumeAnnotationsGetCall) Context(ctx context.Context) *LayersVolumeAnnotationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersVolumeAnnotationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3207,6 +3348,9 @@
"annotationId": c.annotationId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3282,6 +3426,7 @@
layerId string
contentVersion string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Gets the volume annotations for a volume and layer.
@@ -3390,6 +3535,14 @@
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 *LayersVolumeAnnotationsListCall) Context(ctx context.Context) *LayersVolumeAnnotationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersVolumeAnnotationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3442,6 +3595,9 @@
"layerId": c.layerId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3567,6 +3723,7 @@
type MyconfigGetUserSettingsCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetUserSettings: Gets the current settings for the user.
@@ -3583,6 +3740,14 @@
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 *MyconfigGetUserSettingsCall) Context(ctx context.Context) *MyconfigGetUserSettingsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MyconfigGetUserSettingsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3595,6 +3760,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3634,6 +3802,7 @@
volumeIds []string
cpksver string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ReleaseDownloadAccess: Release downloaded content access restriction.
@@ -3666,6 +3835,14 @@
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 *MyconfigReleaseDownloadAccessCall) Context(ctx context.Context) *MyconfigReleaseDownloadAccessCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MyconfigReleaseDownloadAccessCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3688,6 +3865,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3758,6 +3938,7 @@
nonce string
cpksver string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// RequestAccess: Request concurrent and download access restrictions.
@@ -3797,6 +3978,14 @@
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 *MyconfigRequestAccessCall) Context(ctx context.Context) *MyconfigRequestAccessCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MyconfigRequestAccessCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3819,6 +4008,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3911,6 +4103,7 @@
nonce string
cpksver string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SyncVolumeLicenses: Request downloaded content access for specified
@@ -3962,6 +4155,14 @@
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 *MyconfigSyncVolumeLicensesCall) Context(ctx context.Context) *MyconfigSyncVolumeLicensesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MyconfigSyncVolumeLicensesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3989,6 +4190,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4080,6 +4284,7 @@
s *Service
usersettings *Usersettings
opt_ map[string]interface{}
+ ctx_ context.Context
}
// UpdateUserSettings: Sets the settings for the user. If a sub-object
@@ -4099,6 +4304,14 @@
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 *MyconfigUpdateUserSettingsCall) Context(ctx context.Context) *MyconfigUpdateUserSettingsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MyconfigUpdateUserSettingsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.usersettings)
@@ -4117,6 +4330,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4158,6 +4374,7 @@
s *Service
annotationId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an annotation.
@@ -4182,6 +4399,14 @@
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 *MylibraryAnnotationsDeleteCall) Context(ctx context.Context) *MylibraryAnnotationsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MylibraryAnnotationsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4199,6 +4424,9 @@
"annotationId": c.annotationId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4246,6 +4474,7 @@
s *Service
annotation *Annotation
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new annotation.
@@ -4285,6 +4514,14 @@
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 *MylibraryAnnotationsInsertCall) Context(ctx context.Context) *MylibraryAnnotationsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MylibraryAnnotationsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotation)
@@ -4312,6 +4549,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4369,6 +4609,7 @@
type MylibraryAnnotationsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of annotations, possibly filtered.
@@ -4458,6 +4699,14 @@
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 *MylibraryAnnotationsListCall) Context(ctx context.Context) *MylibraryAnnotationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MylibraryAnnotationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4500,6 +4749,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4595,6 +4847,7 @@
layerIds []string
volumeId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Summary: Gets the summary of specified layers.
@@ -4613,6 +4866,14 @@
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 *MylibraryAnnotationsSummaryCall) Context(ctx context.Context) *MylibraryAnnotationsSummaryCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MylibraryAnnotationsSummaryCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4629,6 +4890,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4687,6 +4951,7 @@
annotationId string
annotation *Annotation
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing annotation.
@@ -4712,6 +4977,14 @@
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 *MylibraryAnnotationsUpdateCall) Context(ctx context.Context) *MylibraryAnnotationsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MylibraryAnnotationsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotation)
@@ -4735,6 +5008,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4793,6 +5069,7 @@
shelf string
volumeId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AddVolume: Adds a volume to a bookshelf.
@@ -4830,6 +5107,14 @@
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 *MylibraryBookshelvesAddVolumeCall) Context(ctx context.Context) *MylibraryBookshelvesAddVolumeCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MylibraryBookshelvesAddVolumeCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4851,6 +5136,9 @@
"shelf": c.shelf,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4920,6 +5208,7 @@
s *Service
shelf string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ClearVolumes: Clears all volumes from a bookshelf.
@@ -4944,6 +5233,14 @@
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 *MylibraryBookshelvesClearVolumesCall) Context(ctx context.Context) *MylibraryBookshelvesClearVolumesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MylibraryBookshelvesClearVolumesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4961,6 +5258,9 @@
"shelf": c.shelf,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5008,6 +5308,7 @@
s *Service
shelf string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves metadata for a specific bookshelf belonging to the
@@ -5033,6 +5334,14 @@
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 *MylibraryBookshelvesGetCall) Context(ctx context.Context) *MylibraryBookshelvesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MylibraryBookshelvesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5050,6 +5359,9 @@
"shelf": c.shelf,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5103,6 +5415,7 @@
type MylibraryBookshelvesListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of bookshelves belonging to the authenticated
@@ -5127,6 +5440,14 @@
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 *MylibraryBookshelvesListCall) Context(ctx context.Context) *MylibraryBookshelvesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MylibraryBookshelvesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5142,6 +5463,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5189,6 +5513,7 @@
volumeId string
volumePosition int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// MoveVolume: Moves a volume within a bookshelf.
@@ -5215,6 +5540,14 @@
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 *MylibraryBookshelvesMoveVolumeCall) Context(ctx context.Context) *MylibraryBookshelvesMoveVolumeCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MylibraryBookshelvesMoveVolumeCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5234,6 +5567,9 @@
"shelf": c.shelf,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5297,6 +5633,7 @@
shelf string
volumeId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// RemoveVolume: Removes a volume from a bookshelf.
@@ -5332,6 +5669,14 @@
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 *MylibraryBookshelvesRemoveVolumeCall) Context(ctx context.Context) *MylibraryBookshelvesRemoveVolumeCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MylibraryBookshelvesRemoveVolumeCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5353,6 +5698,9 @@
"shelf": c.shelf,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5418,6 +5766,7 @@
s *Service
shelf string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Gets volume information for volumes on a bookshelf.
@@ -5488,6 +5837,14 @@
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 *MylibraryBookshelvesVolumesListCall) Context(ctx context.Context) *MylibraryBookshelvesVolumesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MylibraryBookshelvesVolumesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5523,6 +5880,9 @@
"shelf": c.shelf,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5619,6 +5979,7 @@
s *Service
volumeId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves my reading position information for a volume.
@@ -5650,6 +6011,14 @@
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 *MylibraryReadingpositionsGetCall) Context(ctx context.Context) *MylibraryReadingpositionsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MylibraryReadingpositionsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5670,6 +6039,9 @@
"volumeId": c.volumeId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5731,6 +6103,7 @@
timestamp string
position string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetPosition: Sets my reading position information for a volume.
@@ -5786,6 +6159,14 @@
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 *MylibraryReadingpositionsSetPositionCall) Context(ctx context.Context) *MylibraryReadingpositionsSetPositionCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MylibraryReadingpositionsSetPositionCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5814,6 +6195,9 @@
"volumeId": c.volumeId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5905,6 +6289,7 @@
type OnboardingListCategoriesCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ListCategories: List categories for onboarding experience.
@@ -5928,6 +6313,14 @@
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 *OnboardingListCategoriesCall) Context(ctx context.Context) *OnboardingListCategoriesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OnboardingListCategoriesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5943,6 +6336,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5987,6 +6383,7 @@
type OnboardingListCategoryVolumesCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ListCategoryVolumes: List available volumes under categories for
@@ -6045,6 +6442,14 @@
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 *OnboardingListCategoryVolumesCall) Context(ctx context.Context) *OnboardingListCategoryVolumesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OnboardingListCategoryVolumesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6072,6 +6477,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6146,6 +6554,7 @@
type PromoofferAcceptCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Accept:
@@ -6212,6 +6621,14 @@
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 *PromoofferAcceptCall) Context(ctx context.Context) *PromoofferAcceptCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PromoofferAcceptCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6248,6 +6665,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6319,6 +6739,7 @@
type PromoofferDismissCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Dismiss:
@@ -6378,6 +6799,14 @@
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 *PromoofferDismissCall) Context(ctx context.Context) *PromoofferDismissCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PromoofferDismissCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6411,6 +6840,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6478,6 +6910,7 @@
type PromoofferGetCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns a list of promo offers available to the user
@@ -6531,6 +6964,14 @@
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 *PromoofferGetCall) Context(ctx context.Context) *PromoofferGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PromoofferGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6561,6 +7002,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6631,6 +7075,7 @@
s *Service
volumeId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets volume information for a single volume.
@@ -6687,6 +7132,14 @@
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 *VolumesGetCall) Context(ctx context.Context) *VolumesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VolumesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6716,6 +7169,9 @@
"volumeId": c.volumeId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6797,6 +7253,7 @@
s *Service
q string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Performs a book search.
@@ -6923,6 +7380,14 @@
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 *VolumesListCall) Context(ctx context.Context) *VolumesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VolumesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6972,6 +7437,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7140,6 +7608,7 @@
s *Service
volumeId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return a list of associated books.
@@ -7197,6 +7666,14 @@
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 *VolumesAssociatedListCall) Context(ctx context.Context) *VolumesAssociatedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VolumesAssociatedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7223,6 +7700,9 @@
"volumeId": c.volumeId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7309,6 +7789,7 @@
type VolumesMybooksListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return a list of books in My Library.
@@ -7383,6 +7864,14 @@
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 *VolumesMybooksListCall) Context(ctx context.Context) *VolumesMybooksListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VolumesMybooksListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7413,6 +7902,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7517,6 +8009,7 @@
type VolumesRecommendedListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return a list of recommended books for the current user.
@@ -7561,6 +8054,14 @@
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 *VolumesRecommendedListCall) Context(ctx context.Context) *VolumesRecommendedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VolumesRecommendedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7582,6 +8083,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7646,6 +8150,7 @@
rating string
volumeId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Rate: Rate a recommended book for the current user.
@@ -7679,6 +8184,14 @@
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 *VolumesRecommendedRateCall) Context(ctx context.Context) *VolumesRecommendedRateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VolumesRecommendedRateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7699,6 +8212,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7772,6 +8288,7 @@
type VolumesUseruploadedListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return a list of books uploaded by the current user.
@@ -7837,6 +8354,14 @@
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 *VolumesUseruploadedListCall) Context(ctx context.Context) *VolumesUseruploadedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VolumesUseruploadedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7867,6 +8392,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/calendar/v3/calendar-gen.go b/calendar/v3/calendar-gen.go
index 454280c..15f03d5 100644
--- a/calendar/v3/calendar-gen.go
+++ b/calendar/v3/calendar-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "calendar:v3"
const apiName = "calendar"
@@ -1068,6 +1068,7 @@
calendarId string
ruleId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an access control rule.
@@ -1086,6 +1087,14 @@
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 *AclDeleteCall) Context(ctx context.Context) *AclDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AclDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1101,6 +1110,9 @@
"ruleId": c.ruleId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1151,6 +1163,7 @@
calendarId string
ruleId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns an access control rule.
@@ -1169,6 +1182,14 @@
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 *AclGetCall) Context(ctx context.Context) *AclGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AclGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1184,6 +1205,9 @@
"ruleId": c.ruleId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1242,6 +1266,7 @@
calendarId string
aclrule *AclRule
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates an access control rule.
@@ -1260,6 +1285,14 @@
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 *AclInsertCall) Context(ctx context.Context) *AclInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AclInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.aclrule)
@@ -1280,6 +1313,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1332,6 +1368,7 @@
s *Service
calendarId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns the rules in the access control list for the calendar.
@@ -1389,6 +1426,14 @@
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 *AclListCall) Context(ctx context.Context) *AclListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AclListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1415,6 +1460,9 @@
"calendarId": c.calendarId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1489,6 +1537,7 @@
ruleId string
aclrule *AclRule
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an access control rule. This method supports patch
@@ -1509,6 +1558,14 @@
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 *AclPatchCall) Context(ctx context.Context) *AclPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AclPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.aclrule)
@@ -1530,6 +1587,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1591,6 +1651,7 @@
ruleId string
aclrule *AclRule
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an access control rule.
@@ -1610,6 +1671,14 @@
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 *AclUpdateCall) Context(ctx context.Context) *AclUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AclUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.aclrule)
@@ -1631,6 +1700,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1691,6 +1763,7 @@
calendarId string
channel *Channel
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Watch: Watch for changes to ACL resources.
@@ -1749,6 +1822,14 @@
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 *AclWatchCall) Context(ctx context.Context) *AclWatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AclWatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
@@ -1781,6 +1862,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1857,6 +1941,7 @@
s *Service
calendarId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an entry on the user's calendar list.
@@ -1874,6 +1959,14 @@
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 *CalendarListDeleteCall) Context(ctx context.Context) *CalendarListDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CalendarListDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1888,6 +1981,9 @@
"calendarId": c.calendarId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1930,6 +2026,7 @@
s *Service
calendarId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns an entry on the user's calendar list.
@@ -1947,6 +2044,14 @@
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 *CalendarListGetCall) Context(ctx context.Context) *CalendarListGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CalendarListGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1961,6 +2066,9 @@
"calendarId": c.calendarId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2011,6 +2119,7 @@
s *Service
calendarlistentry *CalendarListEntry
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Adds an entry to the user's calendar list.
@@ -2038,6 +2147,14 @@
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 *CalendarListInsertCall) Context(ctx context.Context) *CalendarListInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CalendarListInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.calendarlistentry)
@@ -2059,6 +2176,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2106,6 +2226,7 @@
type CalendarListListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns entries on the user's calendar list.
@@ -2187,6 +2308,14 @@
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 *CalendarListListCall) Context(ctx context.Context) *CalendarListListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CalendarListListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2217,6 +2346,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2304,6 +2436,7 @@
calendarId string
calendarlistentry *CalendarListEntry
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an entry on the user's calendar list. This method
@@ -2333,6 +2466,14 @@
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 *CalendarListPatchCall) Context(ctx context.Context) *CalendarListPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CalendarListPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.calendarlistentry)
@@ -2356,6 +2497,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2414,6 +2558,7 @@
calendarId string
calendarlistentry *CalendarListEntry
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an entry on the user's calendar list.
@@ -2442,6 +2587,14 @@
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 *CalendarListUpdateCall) Context(ctx context.Context) *CalendarListUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CalendarListUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.calendarlistentry)
@@ -2465,6 +2618,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2522,6 +2678,7 @@
s *Service
channel *Channel
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Watch: Watch for changes to CalendarList resources.
@@ -2604,6 +2761,14 @@
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 *CalendarListWatchCall) Context(ctx context.Context) *CalendarListWatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CalendarListWatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
@@ -2640,6 +2805,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2730,6 +2898,7 @@
s *Service
calendarId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Clear: Clears a primary calendar. This operation deletes all events
@@ -2748,6 +2917,14 @@
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 *CalendarsClearCall) Context(ctx context.Context) *CalendarsClearCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CalendarsClearCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2762,6 +2939,9 @@
"calendarId": c.calendarId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2804,6 +2984,7 @@
s *Service
calendarId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a secondary calendar. Use calendars.clear for
@@ -2822,6 +3003,14 @@
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 *CalendarsDeleteCall) Context(ctx context.Context) *CalendarsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CalendarsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2836,6 +3025,9 @@
"calendarId": c.calendarId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2878,6 +3070,7 @@
s *Service
calendarId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns metadata for a calendar.
@@ -2895,6 +3088,14 @@
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 *CalendarsGetCall) Context(ctx context.Context) *CalendarsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CalendarsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2909,6 +3110,9 @@
"calendarId": c.calendarId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2959,6 +3163,7 @@
s *Service
calendar *Calendar
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a secondary calendar.
@@ -2976,6 +3181,14 @@
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 *CalendarsInsertCall) Context(ctx context.Context) *CalendarsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CalendarsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.calendar)
@@ -2994,6 +3207,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3036,6 +3252,7 @@
calendarId string
calendar *Calendar
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates metadata for a calendar. This method supports patch
@@ -3055,6 +3272,14 @@
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 *CalendarsPatchCall) Context(ctx context.Context) *CalendarsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CalendarsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.calendar)
@@ -3075,6 +3300,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3128,6 +3356,7 @@
calendarId string
calendar *Calendar
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates metadata for a calendar.
@@ -3146,6 +3375,14 @@
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 *CalendarsUpdateCall) Context(ctx context.Context) *CalendarsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CalendarsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.calendar)
@@ -3166,6 +3403,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3218,6 +3458,7 @@
s *Service
channel *Channel
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Stop: Stop watching resources through this channel
@@ -3235,6 +3476,14 @@
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 *ChannelsStopCall) Context(ctx context.Context) *ChannelsStopCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChannelsStopCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
@@ -3253,6 +3502,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3288,6 +3540,7 @@
type ColorsGetCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the color definitions for calendars and events.
@@ -3304,6 +3557,14 @@
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 *ColorsGetCall) Context(ctx context.Context) *ColorsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ColorsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3316,6 +3577,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3356,6 +3620,7 @@
calendarId string
eventId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an event.
@@ -3382,6 +3647,14 @@
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 *EventsDeleteCall) Context(ctx context.Context) *EventsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3400,6 +3673,9 @@
"eventId": c.eventId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3455,6 +3731,7 @@
calendarId string
eventId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns an event.
@@ -3501,6 +3778,14 @@
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 *EventsGetCall) Context(ctx context.Context) *EventsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3525,6 +3810,9 @@
"eventId": c.eventId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3600,6 +3888,7 @@
calendarId string
event *Event
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Import: Imports an event. This operation is used to add a private
@@ -3627,6 +3916,14 @@
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 *EventsImportCall) Context(ctx context.Context) *EventsImportCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventsImportCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.event)
@@ -3650,6 +3947,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3708,6 +4008,7 @@
calendarId string
event *Event
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates an event.
@@ -3751,6 +4052,14 @@
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 *EventsInsertCall) Context(ctx context.Context) *EventsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.event)
@@ -3780,6 +4089,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3850,6 +4162,7 @@
calendarId string
eventId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Instances: Returns instances of the specified recurring event.
@@ -3945,6 +4258,14 @@
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 *EventsInstancesCall) Context(ctx context.Context) *EventsInstancesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventsInstancesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3987,6 +4308,9 @@
"eventId": c.eventId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4096,6 +4420,7 @@
s *Service
calendarId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns events on the specified calendar.
@@ -4293,6 +4618,14 @@
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 *EventsListCall) Context(ctx context.Context) *EventsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4358,6 +4691,9 @@
"calendarId": c.calendarId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4513,6 +4849,7 @@
eventId string
destinationid string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Move: Moves an event to another calendar, i.e. changes an event's
@@ -4541,6 +4878,14 @@
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 *EventsMoveCall) Context(ctx context.Context) *EventsMoveCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventsMoveCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4560,6 +4905,9 @@
"eventId": c.eventId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4630,6 +4978,7 @@
eventId string
event *Event
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an event. This method supports patch semantics.
@@ -4686,6 +5035,14 @@
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 *EventsPatchCall) Context(ctx context.Context) *EventsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.event)
@@ -4719,6 +5076,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4801,6 +5161,7 @@
calendarId string
text string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// QuickAdd: Creates an event based on a simple text string.
@@ -4827,6 +5188,14 @@
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 *EventsQuickAddCall) Context(ctx context.Context) *EventsQuickAddCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventsQuickAddCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4845,6 +5214,9 @@
"calendarId": c.calendarId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4908,6 +5280,7 @@
eventId string
event *Event
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an event.
@@ -4964,6 +5337,14 @@
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 *EventsUpdateCall) Context(ctx context.Context) *EventsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.event)
@@ -4997,6 +5378,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5079,6 +5463,7 @@
calendarId string
channel *Channel
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Watch: Watch for changes to Events resources.
@@ -5277,6 +5662,14 @@
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 *EventsWatchCall) Context(ctx context.Context) *EventsWatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventsWatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
@@ -5348,6 +5741,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5505,6 +5901,7 @@
s *Service
freebusyrequest *FreeBusyRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Query: Returns free/busy information for a set of calendars.
@@ -5522,6 +5919,14 @@
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 *FreebusyQueryCall) Context(ctx context.Context) *FreebusyQueryCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FreebusyQueryCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.freebusyrequest)
@@ -5540,6 +5945,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5582,6 +5990,7 @@
s *Service
setting string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns a single user setting.
@@ -5599,6 +6008,14 @@
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 *SettingsGetCall) Context(ctx context.Context) *SettingsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SettingsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5613,6 +6030,9 @@
"setting": c.setting,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5662,6 +6082,7 @@
type SettingsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns all user settings for the authenticated user.
@@ -5707,6 +6128,14 @@
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 *SettingsListCall) Context(ctx context.Context) *SettingsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SettingsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5728,6 +6157,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5787,6 +6219,7 @@
s *Service
channel *Channel
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Watch: Watch for changes to Settings resources.
@@ -5833,6 +6266,14 @@
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 *SettingsWatchCall) Context(ctx context.Context) *SettingsWatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SettingsWatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
@@ -5860,6 +6301,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/civicinfo/v2/civicinfo-gen.go b/civicinfo/v2/civicinfo-gen.go
index e511a13..51c10d0 100644
--- a/civicinfo/v2/civicinfo-gen.go
+++ b/civicinfo/v2/civicinfo-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "civicinfo:v2"
const apiName = "civicinfo"
@@ -670,6 +670,7 @@
type DivisionsSearchCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Search: Searches for political divisions by their natural name or OCD
@@ -698,6 +699,14 @@
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 *DivisionsSearchCall) Context(ctx context.Context) *DivisionsSearchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DivisionsSearchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -713,6 +722,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -754,6 +766,7 @@
type ElectionsElectionQueryCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ElectionQuery: List of available elections to query.
@@ -770,6 +783,14 @@
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 *ElectionsElectionQueryCall) Context(ctx context.Context) *ElectionsElectionQueryCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ElectionsElectionQueryCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -782,6 +803,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -817,6 +841,7 @@
s *Service
address string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// VoterInfoQuery: Looks up information relevant to a voter based on the
@@ -850,6 +875,14 @@
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 *ElectionsVoterInfoQueryCall) Context(ctx context.Context) *ElectionsVoterInfoQueryCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ElectionsVoterInfoQueryCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -869,6 +902,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -927,6 +963,7 @@
type RepresentativesRepresentativeInfoByAddressCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// RepresentativeInfoByAddress: Looks up political geography and
@@ -1001,6 +1038,14 @@
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 *RepresentativesRepresentativeInfoByAddressCall) Context(ctx context.Context) *RepresentativesRepresentativeInfoByAddressCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RepresentativesRepresentativeInfoByAddressCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1025,6 +1070,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1133,6 +1181,7 @@
s *Service
ocdId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// RepresentativeInfoByDivision: Looks up representative information for
@@ -1203,6 +1252,14 @@
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 *RepresentativesRepresentativeInfoByDivisionCall) Context(ctx context.Context) *RepresentativesRepresentativeInfoByDivisionCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RepresentativesRepresentativeInfoByDivisionCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1226,6 +1283,9 @@
"ocdId": c.ocdId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/classroom/v1/classroom-gen.go b/classroom/v1/classroom-gen.go
index fd8cffd..bb8b8ed 100644
--- a/classroom/v1/classroom-gen.go
+++ b/classroom/v1/classroom-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "classroom:v1"
const apiName = "classroom"
@@ -413,6 +413,7 @@
s *Service
course *Course
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a course. The user specified in `ownerId` is the
@@ -437,6 +438,14 @@
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 *CoursesCreateCall) Context(ctx context.Context) *CoursesCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CoursesCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.course)
@@ -455,6 +464,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -496,6 +508,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a course. This method returns the following error
@@ -517,6 +530,14 @@
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 *CoursesDeleteCall) Context(ctx context.Context) *CoursesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CoursesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -531,6 +552,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -580,6 +604,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns a course. This method returns the following error codes:
@@ -601,6 +626,14 @@
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 *CoursesGetCall) Context(ctx context.Context) *CoursesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CoursesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -615,6 +648,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -664,6 +700,7 @@
type CoursesListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns a list of courses that the requesting user is permitted
@@ -726,6 +763,14 @@
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 *CoursesListCall) Context(ctx context.Context) *CoursesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CoursesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -750,6 +795,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -813,6 +861,7 @@
id string
course *Course
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates one or more fields in a course. This method returns
@@ -849,6 +898,14 @@
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 *CoursesPatchCall) Context(ctx context.Context) *CoursesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CoursesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.course)
@@ -872,6 +929,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -930,6 +990,7 @@
id string
course *Course
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a course. This method returns the following error
@@ -952,6 +1013,14 @@
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 *CoursesUpdateCall) Context(ctx context.Context) *CoursesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CoursesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.course)
@@ -972,6 +1041,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1025,6 +1097,7 @@
courseId string
coursealias *CourseAlias
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates an alias for a course. This method returns the
@@ -1047,6 +1120,14 @@
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 *CoursesAliasesCreateCall) Context(ctx context.Context) *CoursesAliasesCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CoursesAliasesCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.coursealias)
@@ -1067,6 +1148,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1120,6 +1204,7 @@
courseId string
aliasid string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an alias of a course. This method returns the
@@ -1142,6 +1227,14 @@
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 *CoursesAliasesDeleteCall) Context(ctx context.Context) *CoursesAliasesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CoursesAliasesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1157,6 +1250,9 @@
"alias": c.aliasid,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1213,6 +1309,7 @@
s *Service
courseId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns a list of aliases for a course. This method returns the
@@ -1255,6 +1352,14 @@
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 *CoursesAliasesListCall) Context(ctx context.Context) *CoursesAliasesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CoursesAliasesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1275,6 +1380,9 @@
"courseId": c.courseId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1337,6 +1445,7 @@
courseId string
student *Student
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Adds a user as a student of a course. This method returns the
@@ -1371,6 +1480,14 @@
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 *CoursesStudentsCreateCall) Context(ctx context.Context) *CoursesStudentsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CoursesStudentsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.student)
@@ -1394,6 +1511,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1454,6 +1574,7 @@
courseId string
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a student of a course. This method returns the
@@ -1477,6 +1598,14 @@
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 *CoursesStudentsDeleteCall) Context(ctx context.Context) *CoursesStudentsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CoursesStudentsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1492,6 +1621,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1549,6 +1681,7 @@
courseId string
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns a student of a course. This method returns the following
@@ -1572,6 +1705,14 @@
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 *CoursesStudentsGetCall) Context(ctx context.Context) *CoursesStudentsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CoursesStudentsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1587,6 +1728,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1646,6 +1790,7 @@
s *Service
courseId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns a list of students of this course that the requester is
@@ -1686,6 +1831,14 @@
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 *CoursesStudentsListCall) Context(ctx context.Context) *CoursesStudentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CoursesStudentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1706,6 +1859,9 @@
"courseId": c.courseId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1770,6 +1926,7 @@
courseId string
teacher *Teacher
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a teacher of a course. This method returns the
@@ -1794,6 +1951,14 @@
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 *CoursesTeachersCreateCall) Context(ctx context.Context) *CoursesTeachersCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CoursesTeachersCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.teacher)
@@ -1814,6 +1979,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1869,6 +2037,7 @@
courseId string
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a teacher of a course. This method returns the
@@ -1893,6 +2062,14 @@
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 *CoursesTeachersDeleteCall) Context(ctx context.Context) *CoursesTeachersDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CoursesTeachersDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1908,6 +2085,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1965,6 +2145,7 @@
courseId string
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns a teacher of a course. This method returns the following
@@ -1988,6 +2169,14 @@
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 *CoursesTeachersGetCall) Context(ctx context.Context) *CoursesTeachersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CoursesTeachersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2003,6 +2192,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2062,6 +2254,7 @@
s *Service
courseId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns a list of teachers of this course that the requester is
@@ -2102,6 +2295,14 @@
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 *CoursesTeachersListCall) Context(ctx context.Context) *CoursesTeachersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CoursesTeachersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2122,6 +2323,9 @@
"courseId": c.courseId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2185,6 +2389,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Accept: Accepts an invitation, removing it and adding the invited
@@ -2208,6 +2413,14 @@
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 *InvitationsAcceptCall) Context(ctx context.Context) *InvitationsAcceptCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InvitationsAcceptCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2222,6 +2435,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2271,6 +2487,7 @@
s *Service
invitation *Invitation
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates an invitation. Only one invitation for a user and
@@ -2297,6 +2514,14 @@
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 *InvitationsCreateCall) Context(ctx context.Context) *InvitationsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InvitationsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.invitation)
@@ -2315,6 +2540,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2356,6 +2584,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an invitation. This method returns the following
@@ -2377,6 +2606,14 @@
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 *InvitationsDeleteCall) Context(ctx context.Context) *InvitationsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InvitationsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2391,6 +2628,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2440,6 +2680,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns an invitation. This method returns the following error
@@ -2461,6 +2702,14 @@
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 *InvitationsGetCall) Context(ctx context.Context) *InvitationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InvitationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2475,6 +2724,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2524,6 +2776,7 @@
type InvitationsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns a list of invitations that the requesting user is
@@ -2582,6 +2835,14 @@
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 *InvitationsListCall) Context(ctx context.Context) *InvitationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InvitationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2606,6 +2867,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2668,6 +2932,7 @@
s *Service
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns a user profile. This method returns the following error
@@ -2689,6 +2954,14 @@
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 *UserProfilesGetCall) Context(ctx context.Context) *UserProfilesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserProfilesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2703,6 +2976,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/cloudbilling/v1/cloudbilling-gen.go b/cloudbilling/v1/cloudbilling-gen.go
index bf76574..9bbcc39 100644
--- a/cloudbilling/v1/cloudbilling-gen.go
+++ b/cloudbilling/v1/cloudbilling-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "cloudbilling:v1"
const apiName = "cloudbilling"
@@ -189,6 +189,7 @@
s *Service
name string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets information about a billing account. The current
@@ -208,6 +209,14 @@
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 *BillingAccountsGetCall) Context(ctx context.Context) *BillingAccountsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BillingAccountsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -222,6 +231,9 @@
"name": c.name,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -271,6 +283,7 @@
type BillingAccountsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the billing accounts that the current authenticated user
@@ -305,6 +318,14 @@
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 *BillingAccountsListCall) Context(ctx context.Context) *BillingAccountsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BillingAccountsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -323,6 +344,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -374,6 +398,7 @@
s *Service
name string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the projects associated with a billing account. The
@@ -410,6 +435,14 @@
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 *BillingAccountsProjectsListCall) Context(ctx context.Context) *BillingAccountsProjectsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BillingAccountsProjectsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -430,6 +463,9 @@
"name": c.name,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -491,6 +527,7 @@
s *Service
name string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetBillingInfo: Gets the billing information for a project. The
@@ -511,6 +548,14 @@
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 *ProjectsGetBillingInfoCall) Context(ctx context.Context) *ProjectsGetBillingInfoCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsGetBillingInfoCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -525,6 +570,9 @@
"name": c.name,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -576,6 +624,7 @@
name string
projectbillinginfo *ProjectBillingInfo
opt_ map[string]interface{}
+ ctx_ context.Context
}
// UpdateBillingInfo: Sets or updates the billing account associated
@@ -621,6 +670,14 @@
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 *ProjectsUpdateBillingInfoCall) Context(ctx context.Context) *ProjectsUpdateBillingInfoCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsUpdateBillingInfoCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.projectbillinginfo)
@@ -641,6 +698,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/clouddebugger/v2/clouddebugger-gen.go b/clouddebugger/v2/clouddebugger-gen.go
index 7f280dd..2d6866e 100644
--- a/clouddebugger/v2/clouddebugger-gen.go
+++ b/clouddebugger/v2/clouddebugger-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "clouddebugger:v2"
const apiName = "clouddebugger"
@@ -613,6 +613,7 @@
s *Service
registerdebuggeerequest *RegisterDebuggeeRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Register: Registers the debuggee with the controller. All agents
@@ -636,6 +637,14 @@
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 *ControllerDebuggeesRegisterCall) Context(ctx context.Context) *ControllerDebuggeesRegisterCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ControllerDebuggeesRegisterCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.registerdebuggeerequest)
@@ -654,6 +663,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -696,6 +708,7 @@
s *Service
debuggeeId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns the list of all active breakpoints for the specified
@@ -733,6 +746,14 @@
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 *ControllerDebuggeesBreakpointsListCall) Context(ctx context.Context) *ControllerDebuggeesBreakpointsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ControllerDebuggeesBreakpointsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -750,6 +771,9 @@
"debuggeeId": c.debuggeeId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -807,6 +831,7 @@
id string
updateactivebreakpointrequest *UpdateActiveBreakpointRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates the breakpoint state or mutable fields. The entire
@@ -832,6 +857,14 @@
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 *ControllerDebuggeesBreakpointsUpdateCall) Context(ctx context.Context) *ControllerDebuggeesBreakpointsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ControllerDebuggeesBreakpointsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.updateactivebreakpointrequest)
@@ -853,6 +886,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -912,6 +948,7 @@
type DebuggerDebuggeesListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all the debuggees that the user can set breakpoints to.
@@ -944,6 +981,14 @@
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 *DebuggerDebuggeesListCall) Context(ctx context.Context) *DebuggerDebuggeesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DebuggerDebuggeesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -962,6 +1007,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1014,6 +1062,7 @@
debuggeeId string
breakpointId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the breakpoint from the debuggee.
@@ -1032,6 +1081,14 @@
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 *DebuggerDebuggeesBreakpointsDeleteCall) Context(ctx context.Context) *DebuggerDebuggeesBreakpointsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DebuggerDebuggeesBreakpointsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1047,6 +1104,9 @@
"breakpointId": c.breakpointId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1105,6 +1165,7 @@
debuggeeId string
breakpointId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets breakpoint information.
@@ -1123,6 +1184,14 @@
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 *DebuggerDebuggeesBreakpointsGetCall) Context(ctx context.Context) *DebuggerDebuggeesBreakpointsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DebuggerDebuggeesBreakpointsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1138,6 +1207,9 @@
"breakpointId": c.breakpointId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1195,6 +1267,7 @@
s *Service
debuggeeId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all breakpoints of the debuggee that the user has access
@@ -1259,6 +1332,14 @@
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 *DebuggerDebuggeesBreakpointsListCall) Context(ctx context.Context) *DebuggerDebuggeesBreakpointsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DebuggerDebuggeesBreakpointsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1288,6 +1369,9 @@
"debuggeeId": c.debuggeeId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1368,6 +1452,7 @@
debuggeeId string
breakpoint *Breakpoint
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Set: Sets the breakpoint to the debuggee.
@@ -1386,6 +1471,14 @@
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 *DebuggerDebuggeesBreakpointsSetCall) Context(ctx context.Context) *DebuggerDebuggeesBreakpointsSetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DebuggerDebuggeesBreakpointsSetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.breakpoint)
@@ -1406,6 +1499,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/cloudlatencytest/v2/cloudlatencytest-gen.go b/cloudlatencytest/v2/cloudlatencytest-gen.go
index 1167586..0305107 100644
--- a/cloudlatencytest/v2/cloudlatencytest-gen.go
+++ b/cloudlatencytest/v2/cloudlatencytest-gen.go
@@ -13,6 +13,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -32,7 +33,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "cloudlatencytest:v2"
const apiName = "cloudlatencytest"
@@ -124,6 +124,7 @@
s *Service
aggregatedstats *AggregatedStats
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Updateaggregatedstats: RPC to update the new TCP stats.
@@ -141,6 +142,14 @@
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 *StatscollectionUpdateaggregatedstatsCall) Context(ctx context.Context) *StatscollectionUpdateaggregatedstatsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *StatscollectionUpdateaggregatedstatsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.aggregatedstats)
@@ -159,6 +168,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -200,6 +212,7 @@
s *Service
stats *Stats
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Updatestats: RPC to update the new TCP stats.
@@ -217,6 +230,14 @@
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 *StatscollectionUpdatestatsCall) Context(ctx context.Context) *StatscollectionUpdatestatsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *StatscollectionUpdatestatsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.stats)
@@ -235,6 +256,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/cloudmonitoring/v2beta2/cloudmonitoring-gen.go b/cloudmonitoring/v2beta2/cloudmonitoring-gen.go
index bec6125..3234c36 100644
--- a/cloudmonitoring/v2beta2/cloudmonitoring-gen.go
+++ b/cloudmonitoring/v2beta2/cloudmonitoring-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "cloudmonitoring:v2beta2"
const apiName = "cloudmonitoring"
@@ -421,6 +421,7 @@
project string
metricdescriptor *MetricDescriptor
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Create a new metric.
@@ -439,6 +440,14 @@
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 *MetricDescriptorsCreateCall) Context(ctx context.Context) *MetricDescriptorsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MetricDescriptorsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.metricdescriptor)
@@ -459,6 +468,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -513,6 +525,7 @@
project string
metric string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete an existing metric.
@@ -531,6 +544,14 @@
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 *MetricDescriptorsDeleteCall) Context(ctx context.Context) *MetricDescriptorsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MetricDescriptorsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -546,6 +567,9 @@
"metric": c.metric,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -604,6 +628,7 @@
project string
listmetricdescriptorsrequest *ListMetricDescriptorsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List metric descriptors that match the query. If the query is
@@ -654,6 +679,14 @@
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 *MetricDescriptorsListCall) Context(ctx context.Context) *MetricDescriptorsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MetricDescriptorsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -677,6 +710,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -752,6 +788,7 @@
youngest string
listtimeseriesrequest *ListTimeseriesRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List the data points of the time series that match the metric
@@ -863,6 +900,14 @@
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 *TimeseriesListCall) Context(ctx context.Context) *TimeseriesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TimeseriesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -900,6 +945,9 @@
"metric": c.metric,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1023,6 +1071,7 @@
project string
writetimeseriesrequest *WriteTimeseriesRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Write: Put data points to one or more time series for one or more
@@ -1048,6 +1097,14 @@
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 *TimeseriesWriteCall) Context(ctx context.Context) *TimeseriesWriteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TimeseriesWriteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.writetimeseriesrequest)
@@ -1068,6 +1125,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1124,6 +1184,7 @@
youngest string
listtimeseriesdescriptorsrequest *ListTimeseriesDescriptorsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List the descriptors of the time series that match the metric
@@ -1236,6 +1297,14 @@
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 *TimeseriesDescriptorsListCall) Context(ctx context.Context) *TimeseriesDescriptorsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TimeseriesDescriptorsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1273,6 +1342,9 @@
"metric": c.metric,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go b/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go
index a54be08..bd890a7 100644
--- a/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go
+++ b/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "cloudresourcemanager:v1beta1"
const apiName = "cloudresourcemanager"
@@ -316,6 +316,7 @@
s *Service
organizationId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Fetches an Organization resource by id.
@@ -333,6 +334,14 @@
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 *OrganizationsGetCall) Context(ctx context.Context) *OrganizationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrganizationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -347,6 +356,9 @@
"organizationId": c.organizationId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -397,6 +409,7 @@
resource string
getiampolicyrequest *GetIamPolicyRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetIamPolicy: Gets the access control policy for a Organization
@@ -416,6 +429,14 @@
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 *OrganizationsGetIamPolicyCall) Context(ctx context.Context) *OrganizationsGetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrganizationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
@@ -436,6 +457,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -487,6 +511,7 @@
type OrganizationsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Query Organization resources.
@@ -533,6 +558,14 @@
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 *OrganizationsListCall) Context(ctx context.Context) *OrganizationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrganizationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -554,6 +587,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -611,6 +647,7 @@
resource string
setiampolicyrequest *SetIamPolicyRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetIamPolicy: Sets the access control policy on a Organization
@@ -630,6 +667,14 @@
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 *OrganizationsSetIamPolicyCall) Context(ctx context.Context) *OrganizationsSetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrganizationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
@@ -650,6 +695,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -703,6 +751,7 @@
resource string
testiampermissionsrequest *TestIamPermissionsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// TestIamPermissions: Returns permissions that a caller has on the
@@ -722,6 +771,14 @@
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 *OrganizationsTestIamPermissionsCall) Context(ctx context.Context) *OrganizationsTestIamPermissionsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrganizationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
@@ -742,6 +799,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -795,6 +855,7 @@
organizationId string
organization *Organization
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an Organization resource.
@@ -813,6 +874,14 @@
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 *OrganizationsUpdateCall) Context(ctx context.Context) *OrganizationsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrganizationsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.organization)
@@ -833,6 +902,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -885,6 +957,7 @@
s *Service
project *Project
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a project resource. Initially, the project resource
@@ -906,6 +979,14 @@
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 *ProjectsCreateCall) Context(ctx context.Context) *ProjectsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.project)
@@ -924,6 +1005,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -965,6 +1049,7 @@
s *Service
projectId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Marks the project identified by the specified `project_id`
@@ -1006,6 +1091,14 @@
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 *ProjectsDeleteCall) Context(ctx context.Context) *ProjectsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1020,6 +1113,9 @@
"projectId": c.projectId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1069,6 +1165,7 @@
s *Service
projectId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves the project identified by the specified `project_id`
@@ -1088,6 +1185,14 @@
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 *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1102,6 +1207,9 @@
"projectId": c.projectId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1152,6 +1260,7 @@
resource string
getiampolicyrequest *GetIamPolicyRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetIamPolicy: Returns the IAM access control policy for specified
@@ -1171,6 +1280,14 @@
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 *ProjectsGetIamPolicyCall) Context(ctx context.Context) *ProjectsGetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
@@ -1191,6 +1308,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1242,6 +1362,7 @@
type ProjectsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists projects that are visible to the user and satisfy the
@@ -1295,6 +1416,14 @@
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 *ProjectsListCall) Context(ctx context.Context) *ProjectsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1316,6 +1445,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1373,6 +1505,7 @@
resource string
setiampolicyrequest *SetIamPolicyRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetIamPolicy: Sets the IAM access control policy for the specified
@@ -1394,6 +1527,14 @@
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 *ProjectsSetIamPolicyCall) Context(ctx context.Context) *ProjectsSetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
@@ -1414,6 +1555,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1467,6 +1611,7 @@
resource string
testiampermissionsrequest *TestIamPermissionsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// TestIamPermissions: Tests the specified permissions against the IAM
@@ -1486,6 +1631,14 @@
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 *ProjectsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsTestIamPermissionsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
@@ -1506,6 +1659,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1558,6 +1714,7 @@
s *Service
projectId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Undelete: Restores the project identified by the specified
@@ -1583,6 +1740,14 @@
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 *ProjectsUndeleteCall) Context(ctx context.Context) *ProjectsUndeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsUndeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1597,6 +1762,9 @@
"projectId": c.projectId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1647,6 +1815,7 @@
projectId string
project *Project
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates the attributes of the project identified by the
@@ -1667,6 +1836,14 @@
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 *ProjectsUpdateCall) Context(ctx context.Context) *ProjectsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.project)
@@ -1687,6 +1864,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/clouduseraccounts/v0.alpha/clouduseraccounts-gen.go b/clouduseraccounts/v0.alpha/clouduseraccounts-gen.go
index abe2544..6105743 100644
--- a/clouduseraccounts/v0.alpha/clouduseraccounts-gen.go
+++ b/clouduseraccounts/v0.alpha/clouduseraccounts-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "clouduseraccounts:alpha"
const apiName = "clouduseraccounts"
@@ -700,6 +700,7 @@
project string
operation string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified operation resource.
@@ -718,6 +719,14 @@
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 *GlobalAccountsOperationsDeleteCall) Context(ctx context.Context) *GlobalAccountsOperationsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalAccountsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -733,6 +742,9 @@
"operation": c.operation,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -786,6 +798,7 @@
project string
operation string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves the specified operation resource.
@@ -804,6 +817,14 @@
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 *GlobalAccountsOperationsGetCall) Context(ctx context.Context) *GlobalAccountsOperationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalAccountsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -819,6 +840,9 @@
"operation": c.operation,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -880,6 +904,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of operation resources contained within the
@@ -951,6 +976,14 @@
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 *GlobalAccountsOperationsListCall) Context(ctx context.Context) *GlobalAccountsOperationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalAccountsOperationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -977,6 +1010,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1056,6 +1092,7 @@
groupName string
groupsaddmemberrequest *GroupsAddMemberRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AddMember: Adds users to the specified group.
@@ -1075,6 +1112,14 @@
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 *GroupsAddMemberCall) Context(ctx context.Context) *GroupsAddMemberCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsAddMemberCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.groupsaddmemberrequest)
@@ -1096,6 +1141,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1159,6 +1207,7 @@
project string
groupName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified Group resource.
@@ -1177,6 +1226,14 @@
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 *GroupsDeleteCall) Context(ctx context.Context) *GroupsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1192,6 +1249,9 @@
"groupName": c.groupName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1252,6 +1312,7 @@
project string
groupName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified Group resource.
@@ -1270,6 +1331,14 @@
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 *GroupsGetCall) Context(ctx context.Context) *GroupsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1285,6 +1354,9 @@
"groupName": c.groupName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1347,6 +1419,7 @@
project string
resource string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetIamPolicy: Gets the access control policy for a resource. May be
@@ -1366,6 +1439,14 @@
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 *GroupsGetIamPolicyCall) Context(ctx context.Context) *GroupsGetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1381,6 +1462,9 @@
"resource": c.resource,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1443,6 +1527,7 @@
project string
group *Group
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a Group resource in the specified project using the
@@ -1462,6 +1547,14 @@
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 *GroupsInsertCall) Context(ctx context.Context) *GroupsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
@@ -1482,6 +1575,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1536,6 +1632,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of groups contained within the specified
@@ -1607,6 +1704,14 @@
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 *GroupsListCall) Context(ctx context.Context) *GroupsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1633,6 +1738,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1712,6 +1820,7 @@
groupName string
groupsremovememberrequest *GroupsRemoveMemberRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// RemoveMember: Removes users from the specified group.
@@ -1731,6 +1840,14 @@
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 *GroupsRemoveMemberCall) Context(ctx context.Context) *GroupsRemoveMemberCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsRemoveMemberCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.groupsremovememberrequest)
@@ -1752,6 +1869,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1816,6 +1936,7 @@
resource string
policy *Policy
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetIamPolicy: Sets the access control policy on the specified
@@ -1836,6 +1957,14 @@
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 *GroupsSetIamPolicyCall) Context(ctx context.Context) *GroupsSetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy)
@@ -1857,6 +1986,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1923,6 +2055,7 @@
resource string
testpermissionsrequest *TestPermissionsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// TestIamPermissions: Returns permissions that a caller has on the
@@ -1943,6 +2076,14 @@
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 *GroupsTestIamPermissionsCall) Context(ctx context.Context) *GroupsTestIamPermissionsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
@@ -1964,6 +2105,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2031,6 +2175,7 @@
user string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetAuthorizedKeysView: Returns a list of authorized public keys for a
@@ -2059,6 +2204,14 @@
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 *LinuxGetAuthorizedKeysViewCall) Context(ctx context.Context) *LinuxGetAuthorizedKeysViewCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LinuxGetAuthorizedKeysViewCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2079,6 +2232,9 @@
"user": c.user,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2162,6 +2318,7 @@
zone string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetLinuxAccountViews: Retrieves a list of user accounts for an
@@ -2235,6 +2392,14 @@
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 *LinuxGetLinuxAccountViewsCall) Context(ctx context.Context) *LinuxGetLinuxAccountViewsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LinuxGetLinuxAccountViewsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2263,6 +2428,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2357,6 +2525,7 @@
user string
publickey *PublicKey
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AddPublicKey: Adds a public key to the specified User resource with
@@ -2377,6 +2546,14 @@
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 *UsersAddPublicKeyCall) Context(ctx context.Context) *UsersAddPublicKeyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersAddPublicKeyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.publickey)
@@ -2398,6 +2575,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2461,6 +2641,7 @@
project string
user string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified User resource.
@@ -2479,6 +2660,14 @@
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 *UsersDeleteCall) Context(ctx context.Context) *UsersDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2494,6 +2683,9 @@
"user": c.user,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2554,6 +2746,7 @@
project string
user string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified User resource.
@@ -2572,6 +2765,14 @@
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 *UsersGetCall) Context(ctx context.Context) *UsersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2587,6 +2788,9 @@
"user": c.user,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2649,6 +2853,7 @@
project string
resource string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetIamPolicy: Gets the access control policy for a resource. May be
@@ -2668,6 +2873,14 @@
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 *UsersGetIamPolicyCall) Context(ctx context.Context) *UsersGetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2683,6 +2896,9 @@
"resource": c.resource,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2745,6 +2961,7 @@
project string
user *User
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a User resource in the specified project using the
@@ -2764,6 +2981,14 @@
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 *UsersInsertCall) Context(ctx context.Context) *UsersInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
@@ -2784,6 +3009,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2838,6 +3066,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of users contained within the specified
@@ -2909,6 +3138,14 @@
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 *UsersListCall) Context(ctx context.Context) *UsersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2935,6 +3172,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3014,6 +3254,7 @@
user string
fingerprint string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// RemovePublicKey: Removes the specified public key from the user.
@@ -3033,6 +3274,14 @@
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 *UsersRemovePublicKeyCall) Context(ctx context.Context) *UsersRemovePublicKeyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersRemovePublicKeyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3049,6 +3298,9 @@
"user": c.user,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3118,6 +3370,7 @@
resource string
policy *Policy
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetIamPolicy: Sets the access control policy on the specified
@@ -3138,6 +3391,14 @@
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 *UsersSetIamPolicyCall) Context(ctx context.Context) *UsersSetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy)
@@ -3159,6 +3420,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3225,6 +3489,7 @@
resource string
testpermissionsrequest *TestPermissionsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// TestIamPermissions: Returns permissions that a caller has on the
@@ -3245,6 +3510,14 @@
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 *UsersTestIamPermissionsCall) Context(ctx context.Context) *UsersTestIamPermissionsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
@@ -3266,6 +3539,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/clouduseraccounts/v0.beta/clouduseraccounts-gen.go b/clouduseraccounts/v0.beta/clouduseraccounts-gen.go
index ab3f6b7..445a3a0 100644
--- a/clouduseraccounts/v0.beta/clouduseraccounts-gen.go
+++ b/clouduseraccounts/v0.beta/clouduseraccounts-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "clouduseraccounts:beta"
const apiName = "clouduseraccounts"
@@ -523,6 +523,7 @@
project string
operation string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified operation resource.
@@ -541,6 +542,14 @@
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 *GlobalAccountsOperationsDeleteCall) Context(ctx context.Context) *GlobalAccountsOperationsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalAccountsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -556,6 +565,9 @@
"operation": c.operation,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -609,6 +621,7 @@
project string
operation string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves the specified operation resource.
@@ -627,6 +640,14 @@
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 *GlobalAccountsOperationsGetCall) Context(ctx context.Context) *GlobalAccountsOperationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalAccountsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -642,6 +663,9 @@
"operation": c.operation,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -703,6 +727,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of operation resources contained within the
@@ -774,6 +799,14 @@
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 *GlobalAccountsOperationsListCall) Context(ctx context.Context) *GlobalAccountsOperationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalAccountsOperationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -800,6 +833,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -879,6 +915,7 @@
groupName string
groupsaddmemberrequest *GroupsAddMemberRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AddMember: Adds users to the specified group.
@@ -898,6 +935,14 @@
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 *GroupsAddMemberCall) Context(ctx context.Context) *GroupsAddMemberCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsAddMemberCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.groupsaddmemberrequest)
@@ -919,6 +964,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -982,6 +1030,7 @@
project string
groupName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified Group resource.
@@ -1000,6 +1049,14 @@
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 *GroupsDeleteCall) Context(ctx context.Context) *GroupsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1015,6 +1072,9 @@
"groupName": c.groupName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1075,6 +1135,7 @@
project string
groupName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified Group resource.
@@ -1093,6 +1154,14 @@
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 *GroupsGetCall) Context(ctx context.Context) *GroupsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1108,6 +1177,9 @@
"groupName": c.groupName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1170,6 +1242,7 @@
project string
group *Group
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a Group resource in the specified project using the
@@ -1189,6 +1262,14 @@
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 *GroupsInsertCall) Context(ctx context.Context) *GroupsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
@@ -1209,6 +1290,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1263,6 +1347,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of groups contained within the specified
@@ -1334,6 +1419,14 @@
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 *GroupsListCall) Context(ctx context.Context) *GroupsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1360,6 +1453,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1439,6 +1535,7 @@
groupName string
groupsremovememberrequest *GroupsRemoveMemberRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// RemoveMember: Removes users from the specified group.
@@ -1458,6 +1555,14 @@
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 *GroupsRemoveMemberCall) Context(ctx context.Context) *GroupsRemoveMemberCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsRemoveMemberCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.groupsremovememberrequest)
@@ -1479,6 +1584,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1544,6 +1652,7 @@
user string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetAuthorizedKeysView: Returns a list of authorized public keys for a
@@ -1572,6 +1681,14 @@
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 *LinuxGetAuthorizedKeysViewCall) Context(ctx context.Context) *LinuxGetAuthorizedKeysViewCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LinuxGetAuthorizedKeysViewCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1592,6 +1709,9 @@
"user": c.user,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1675,6 +1795,7 @@
zone string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetLinuxAccountViews: Retrieves a list of user accounts for an
@@ -1748,6 +1869,14 @@
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 *LinuxGetLinuxAccountViewsCall) Context(ctx context.Context) *LinuxGetLinuxAccountViewsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LinuxGetLinuxAccountViewsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1776,6 +1905,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1870,6 +2002,7 @@
user string
publickey *PublicKey
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AddPublicKey: Adds a public key to the specified User resource with
@@ -1890,6 +2023,14 @@
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 *UsersAddPublicKeyCall) Context(ctx context.Context) *UsersAddPublicKeyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersAddPublicKeyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.publickey)
@@ -1911,6 +2052,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1974,6 +2118,7 @@
project string
user string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified User resource.
@@ -1992,6 +2137,14 @@
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 *UsersDeleteCall) Context(ctx context.Context) *UsersDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2007,6 +2160,9 @@
"user": c.user,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2067,6 +2223,7 @@
project string
user string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified User resource.
@@ -2085,6 +2242,14 @@
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 *UsersGetCall) Context(ctx context.Context) *UsersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2100,6 +2265,9 @@
"user": c.user,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2162,6 +2330,7 @@
project string
user *User
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a User resource in the specified project using the
@@ -2181,6 +2350,14 @@
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 *UsersInsertCall) Context(ctx context.Context) *UsersInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
@@ -2201,6 +2378,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2255,6 +2435,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of users contained within the specified
@@ -2326,6 +2507,14 @@
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 *UsersListCall) Context(ctx context.Context) *UsersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2352,6 +2541,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2431,6 +2623,7 @@
user string
fingerprint string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// RemovePublicKey: Removes the specified public key from the user.
@@ -2450,6 +2643,14 @@
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 *UsersRemovePublicKeyCall) Context(ctx context.Context) *UsersRemovePublicKeyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersRemovePublicKeyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2466,6 +2667,9 @@
"user": c.user,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/clouduseraccounts/vm_alpha/clouduseraccounts-gen.go b/clouduseraccounts/vm_alpha/clouduseraccounts-gen.go
index fc4efc8..bcd7f94 100644
--- a/clouduseraccounts/vm_alpha/clouduseraccounts-gen.go
+++ b/clouduseraccounts/vm_alpha/clouduseraccounts-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "clouduseraccounts:vm_alpha"
const apiName = "clouduseraccounts"
@@ -700,6 +700,7 @@
project string
operation string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified operation resource.
@@ -718,6 +719,14 @@
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 *GlobalAccountsOperationsDeleteCall) Context(ctx context.Context) *GlobalAccountsOperationsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalAccountsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -733,6 +742,9 @@
"operation": c.operation,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -786,6 +798,7 @@
project string
operation string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves the specified operation resource.
@@ -804,6 +817,14 @@
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 *GlobalAccountsOperationsGetCall) Context(ctx context.Context) *GlobalAccountsOperationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalAccountsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -819,6 +840,9 @@
"operation": c.operation,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -880,6 +904,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of operation resources contained within the
@@ -951,6 +976,14 @@
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 *GlobalAccountsOperationsListCall) Context(ctx context.Context) *GlobalAccountsOperationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalAccountsOperationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -977,6 +1010,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1056,6 +1092,7 @@
groupName string
groupsaddmemberrequest *GroupsAddMemberRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AddMember: Adds users to the specified group.
@@ -1075,6 +1112,14 @@
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 *GroupsAddMemberCall) Context(ctx context.Context) *GroupsAddMemberCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsAddMemberCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.groupsaddmemberrequest)
@@ -1096,6 +1141,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1159,6 +1207,7 @@
project string
groupName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified Group resource.
@@ -1177,6 +1226,14 @@
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 *GroupsDeleteCall) Context(ctx context.Context) *GroupsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1192,6 +1249,9 @@
"groupName": c.groupName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1252,6 +1312,7 @@
project string
groupName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified Group resource.
@@ -1270,6 +1331,14 @@
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 *GroupsGetCall) Context(ctx context.Context) *GroupsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1285,6 +1354,9 @@
"groupName": c.groupName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1347,6 +1419,7 @@
project string
resource string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetIamPolicy: Gets the access control policy for a resource. May be
@@ -1366,6 +1439,14 @@
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 *GroupsGetIamPolicyCall) Context(ctx context.Context) *GroupsGetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1381,6 +1462,9 @@
"resource": c.resource,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1443,6 +1527,7 @@
project string
group *Group
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a Group resource in the specified project using the
@@ -1462,6 +1547,14 @@
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 *GroupsInsertCall) Context(ctx context.Context) *GroupsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
@@ -1482,6 +1575,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1536,6 +1632,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of groups contained within the specified
@@ -1607,6 +1704,14 @@
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 *GroupsListCall) Context(ctx context.Context) *GroupsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1633,6 +1738,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1712,6 +1820,7 @@
groupName string
groupsremovememberrequest *GroupsRemoveMemberRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// RemoveMember: Removes users from the specified group.
@@ -1731,6 +1840,14 @@
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 *GroupsRemoveMemberCall) Context(ctx context.Context) *GroupsRemoveMemberCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsRemoveMemberCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.groupsremovememberrequest)
@@ -1752,6 +1869,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1816,6 +1936,7 @@
resource string
policy *Policy
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetIamPolicy: Sets the access control policy on the specified
@@ -1836,6 +1957,14 @@
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 *GroupsSetIamPolicyCall) Context(ctx context.Context) *GroupsSetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy)
@@ -1857,6 +1986,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1923,6 +2055,7 @@
resource string
testpermissionsrequest *TestPermissionsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// TestIamPermissions: Returns permissions that a caller has on the
@@ -1943,6 +2076,14 @@
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 *GroupsTestIamPermissionsCall) Context(ctx context.Context) *GroupsTestIamPermissionsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
@@ -1964,6 +2105,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2031,6 +2175,7 @@
user string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetAuthorizedKeysView: Returns a list of authorized public keys for a
@@ -2059,6 +2204,14 @@
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 *LinuxGetAuthorizedKeysViewCall) Context(ctx context.Context) *LinuxGetAuthorizedKeysViewCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LinuxGetAuthorizedKeysViewCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2079,6 +2232,9 @@
"user": c.user,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2162,6 +2318,7 @@
zone string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetLinuxAccountViews: Retrieves a list of user accounts for an
@@ -2235,6 +2392,14 @@
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 *LinuxGetLinuxAccountViewsCall) Context(ctx context.Context) *LinuxGetLinuxAccountViewsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LinuxGetLinuxAccountViewsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2263,6 +2428,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2357,6 +2525,7 @@
user string
publickey *PublicKey
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AddPublicKey: Adds a public key to the specified User resource with
@@ -2377,6 +2546,14 @@
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 *UsersAddPublicKeyCall) Context(ctx context.Context) *UsersAddPublicKeyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersAddPublicKeyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.publickey)
@@ -2398,6 +2575,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2461,6 +2641,7 @@
project string
user string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified User resource.
@@ -2479,6 +2660,14 @@
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 *UsersDeleteCall) Context(ctx context.Context) *UsersDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2494,6 +2683,9 @@
"user": c.user,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2554,6 +2746,7 @@
project string
user string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified User resource.
@@ -2572,6 +2765,14 @@
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 *UsersGetCall) Context(ctx context.Context) *UsersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2587,6 +2788,9 @@
"user": c.user,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2649,6 +2853,7 @@
project string
resource string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetIamPolicy: Gets the access control policy for a resource. May be
@@ -2668,6 +2873,14 @@
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 *UsersGetIamPolicyCall) Context(ctx context.Context) *UsersGetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2683,6 +2896,9 @@
"resource": c.resource,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2745,6 +2961,7 @@
project string
user *User
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a User resource in the specified project using the
@@ -2764,6 +2981,14 @@
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 *UsersInsertCall) Context(ctx context.Context) *UsersInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
@@ -2784,6 +3009,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2838,6 +3066,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of users contained within the specified
@@ -2909,6 +3138,14 @@
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 *UsersListCall) Context(ctx context.Context) *UsersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2935,6 +3172,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3014,6 +3254,7 @@
user string
fingerprint string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// RemovePublicKey: Removes the specified public key from the user.
@@ -3033,6 +3274,14 @@
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 *UsersRemovePublicKeyCall) Context(ctx context.Context) *UsersRemovePublicKeyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersRemovePublicKeyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3049,6 +3298,9 @@
"user": c.user,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3118,6 +3370,7 @@
resource string
policy *Policy
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetIamPolicy: Sets the access control policy on the specified
@@ -3138,6 +3391,14 @@
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 *UsersSetIamPolicyCall) Context(ctx context.Context) *UsersSetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy)
@@ -3159,6 +3420,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3225,6 +3489,7 @@
resource string
testpermissionsrequest *TestPermissionsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// TestIamPermissions: Returns permissions that a caller has on the
@@ -3245,6 +3510,14 @@
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 *UsersTestIamPermissionsCall) Context(ctx context.Context) *UsersTestIamPermissionsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest)
@@ -3266,6 +3539,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/clouduseraccounts/vm_beta/clouduseraccounts-gen.go b/clouduseraccounts/vm_beta/clouduseraccounts-gen.go
index b9c3861..7011e70 100644
--- a/clouduseraccounts/vm_beta/clouduseraccounts-gen.go
+++ b/clouduseraccounts/vm_beta/clouduseraccounts-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "clouduseraccounts:vm_beta"
const apiName = "clouduseraccounts"
@@ -523,6 +523,7 @@
project string
operation string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified operation resource.
@@ -541,6 +542,14 @@
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 *GlobalAccountsOperationsDeleteCall) Context(ctx context.Context) *GlobalAccountsOperationsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalAccountsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -556,6 +565,9 @@
"operation": c.operation,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -609,6 +621,7 @@
project string
operation string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves the specified operation resource.
@@ -627,6 +640,14 @@
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 *GlobalAccountsOperationsGetCall) Context(ctx context.Context) *GlobalAccountsOperationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalAccountsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -642,6 +663,9 @@
"operation": c.operation,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -703,6 +727,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of operation resources contained within the
@@ -774,6 +799,14 @@
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 *GlobalAccountsOperationsListCall) Context(ctx context.Context) *GlobalAccountsOperationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalAccountsOperationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -800,6 +833,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -879,6 +915,7 @@
groupName string
groupsaddmemberrequest *GroupsAddMemberRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AddMember: Adds users to the specified group.
@@ -898,6 +935,14 @@
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 *GroupsAddMemberCall) Context(ctx context.Context) *GroupsAddMemberCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsAddMemberCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.groupsaddmemberrequest)
@@ -919,6 +964,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -982,6 +1030,7 @@
project string
groupName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified Group resource.
@@ -1000,6 +1049,14 @@
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 *GroupsDeleteCall) Context(ctx context.Context) *GroupsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1015,6 +1072,9 @@
"groupName": c.groupName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1075,6 +1135,7 @@
project string
groupName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified Group resource.
@@ -1093,6 +1154,14 @@
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 *GroupsGetCall) Context(ctx context.Context) *GroupsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1108,6 +1177,9 @@
"groupName": c.groupName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1170,6 +1242,7 @@
project string
group *Group
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a Group resource in the specified project using the
@@ -1189,6 +1262,14 @@
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 *GroupsInsertCall) Context(ctx context.Context) *GroupsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
@@ -1209,6 +1290,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1263,6 +1347,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of groups contained within the specified
@@ -1334,6 +1419,14 @@
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 *GroupsListCall) Context(ctx context.Context) *GroupsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1360,6 +1453,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1439,6 +1535,7 @@
groupName string
groupsremovememberrequest *GroupsRemoveMemberRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// RemoveMember: Removes users from the specified group.
@@ -1458,6 +1555,14 @@
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 *GroupsRemoveMemberCall) Context(ctx context.Context) *GroupsRemoveMemberCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsRemoveMemberCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.groupsremovememberrequest)
@@ -1479,6 +1584,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1544,6 +1652,7 @@
user string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetAuthorizedKeysView: Returns a list of authorized public keys for a
@@ -1572,6 +1681,14 @@
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 *LinuxGetAuthorizedKeysViewCall) Context(ctx context.Context) *LinuxGetAuthorizedKeysViewCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LinuxGetAuthorizedKeysViewCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1592,6 +1709,9 @@
"user": c.user,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1675,6 +1795,7 @@
zone string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetLinuxAccountViews: Retrieves a list of user accounts for an
@@ -1748,6 +1869,14 @@
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 *LinuxGetLinuxAccountViewsCall) Context(ctx context.Context) *LinuxGetLinuxAccountViewsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LinuxGetLinuxAccountViewsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1776,6 +1905,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1870,6 +2002,7 @@
user string
publickey *PublicKey
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AddPublicKey: Adds a public key to the specified User resource with
@@ -1890,6 +2023,14 @@
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 *UsersAddPublicKeyCall) Context(ctx context.Context) *UsersAddPublicKeyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersAddPublicKeyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.publickey)
@@ -1911,6 +2052,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1974,6 +2118,7 @@
project string
user string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified User resource.
@@ -1992,6 +2137,14 @@
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 *UsersDeleteCall) Context(ctx context.Context) *UsersDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2007,6 +2160,9 @@
"user": c.user,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2067,6 +2223,7 @@
project string
user string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified User resource.
@@ -2085,6 +2242,14 @@
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 *UsersGetCall) Context(ctx context.Context) *UsersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2100,6 +2265,9 @@
"user": c.user,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2162,6 +2330,7 @@
project string
user *User
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a User resource in the specified project using the
@@ -2181,6 +2350,14 @@
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 *UsersInsertCall) Context(ctx context.Context) *UsersInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
@@ -2201,6 +2378,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2255,6 +2435,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of users contained within the specified
@@ -2326,6 +2507,14 @@
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 *UsersListCall) Context(ctx context.Context) *UsersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2352,6 +2541,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2431,6 +2623,7 @@
user string
fingerprint string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// RemovePublicKey: Removes the specified public key from the user.
@@ -2450,6 +2643,14 @@
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 *UsersRemovePublicKeyCall) Context(ctx context.Context) *UsersRemovePublicKeyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersRemovePublicKeyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2466,6 +2667,9 @@
"user": c.user,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/compute/v0.beta/compute-gen.go b/compute/v0.beta/compute-gen.go
index 81e80e7..81da785 100644
--- a/compute/v0.beta/compute-gen.go
+++ b/compute/v0.beta/compute-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "compute:beta"
const apiName = "compute"
@@ -5191,6 +5191,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AggregatedList: Retrieves the list of addresses grouped by scope.
@@ -5262,6 +5263,14 @@
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 *AddressesAggregatedListCall) Context(ctx context.Context) *AddressesAggregatedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AddressesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5288,6 +5297,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5366,6 +5378,7 @@
region string
address string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified address resource.
@@ -5386,6 +5399,14 @@
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 *AddressesDeleteCall) Context(ctx context.Context) *AddressesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AddressesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5402,6 +5423,9 @@
"address": c.address,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5471,6 +5495,7 @@
region string
address string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified address resource.
@@ -5491,6 +5516,14 @@
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 *AddressesGetCall) Context(ctx context.Context) *AddressesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AddressesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5507,6 +5540,9 @@
"address": c.address,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5577,6 +5613,7 @@
region string
address *Address
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates an address resource in the specified project using
@@ -5598,6 +5635,14 @@
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 *AddressesInsertCall) Context(ctx context.Context) *AddressesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AddressesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.address)
@@ -5619,6 +5664,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5682,6 +5730,7 @@
project string
region string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of address resources contained within the
@@ -5755,6 +5804,14 @@
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 *AddressesListCall) Context(ctx context.Context) *AddressesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AddressesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5782,6 +5839,9 @@
"region": c.region,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5866,6 +5926,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AggregatedList: Retrieves the list of autoscalers grouped by scope.
@@ -5936,6 +5997,14 @@
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 *AutoscalersAggregatedListCall) Context(ctx context.Context) *AutoscalersAggregatedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AutoscalersAggregatedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5962,6 +6031,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6040,6 +6112,7 @@
zone string
autoscaler string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified autoscaler resource.
@@ -6059,6 +6132,14 @@
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 *AutoscalersDeleteCall) Context(ctx context.Context) *AutoscalersDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6075,6 +6156,9 @@
"autoscaler": c.autoscaler,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6144,6 +6228,7 @@
zone string
autoscaler string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified autoscaler resource.
@@ -6163,6 +6248,14 @@
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 *AutoscalersGetCall) Context(ctx context.Context) *AutoscalersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AutoscalersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6179,6 +6272,9 @@
"autoscaler": c.autoscaler,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6249,6 +6345,7 @@
zone string
autoscaler *Autoscaler
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates an autoscaler resource in the specified project using
@@ -6269,6 +6366,14 @@
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 *AutoscalersInsertCall) Context(ctx context.Context) *AutoscalersInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AutoscalersInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler)
@@ -6290,6 +6395,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6353,6 +6461,7 @@
project string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of autoscaler resources contained within the
@@ -6425,6 +6534,14 @@
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 *AutoscalersListCall) Context(ctx context.Context) *AutoscalersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AutoscalersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6452,6 +6569,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6539,6 +6659,7 @@
autoscaler string
autoscaler2 *Autoscaler
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an autoscaler resource in the specified project using
@@ -6561,6 +6682,14 @@
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 *AutoscalersPatchCall) Context(ctx context.Context) *AutoscalersPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AutoscalersPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler2)
@@ -6583,6 +6712,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6655,6 +6787,7 @@
zone string
autoscaler *Autoscaler
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an autoscaler resource in the specified project using
@@ -6682,6 +6815,14 @@
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 *AutoscalersUpdateCall) Context(ctx context.Context) *AutoscalersUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler)
@@ -6706,6 +6847,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6775,6 +6919,7 @@
project string
backendService string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified BackendService resource.
@@ -6794,6 +6939,14 @@
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 *BackendServicesDeleteCall) Context(ctx context.Context) *BackendServicesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BackendServicesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6809,6 +6962,9 @@
"backendService": c.backendService,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6869,6 +7025,7 @@
project string
backendService string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified BackendService resource.
@@ -6888,6 +7045,14 @@
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 *BackendServicesGetCall) Context(ctx context.Context) *BackendServicesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BackendServicesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6903,6 +7068,9 @@
"backendService": c.backendService,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6965,6 +7133,7 @@
backendService string
resourcegroupreference *ResourceGroupReference
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetHealth: Gets the most recent health check results for this
@@ -6986,6 +7155,14 @@
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 *BackendServicesGetHealthCall) Context(ctx context.Context) *BackendServicesGetHealthCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BackendServicesGetHealthCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourcegroupreference)
@@ -7007,6 +7184,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7070,6 +7250,7 @@
project string
backendservice *BackendService
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a BackendService resource in the specified project
@@ -7090,6 +7271,14 @@
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 *BackendServicesInsertCall) Context(ctx context.Context) *BackendServicesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BackendServicesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice)
@@ -7110,6 +7299,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7164,6 +7356,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of BackendService resources available to the
@@ -7236,6 +7429,14 @@
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 *BackendServicesListCall) Context(ctx context.Context) *BackendServicesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BackendServicesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7262,6 +7463,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7340,6 +7544,7 @@
backendService string
backendservice *BackendService
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Update the entire content of the BackendService resource. This
@@ -7361,6 +7566,14 @@
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 *BackendServicesPatchCall) Context(ctx context.Context) *BackendServicesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BackendServicesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice)
@@ -7382,6 +7595,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7446,6 +7662,7 @@
backendService string
backendservice *BackendService
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Update the entire content of the BackendService resource.
@@ -7466,6 +7683,14 @@
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 *BackendServicesUpdateCall) Context(ctx context.Context) *BackendServicesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice)
@@ -7487,6 +7712,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7549,6 +7777,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AggregatedList: Retrieves the list of disk type resources grouped by
@@ -7621,6 +7850,14 @@
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 *DiskTypesAggregatedListCall) Context(ctx context.Context) *DiskTypesAggregatedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DiskTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7647,6 +7884,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7725,6 +7965,7 @@
zone string
diskType string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified disk type resource.
@@ -7745,6 +7986,14 @@
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 *DiskTypesGetCall) Context(ctx context.Context) *DiskTypesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DiskTypesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7761,6 +8010,9 @@
"diskType": c.diskType,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7830,6 +8082,7 @@
project string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of disk type resources available to the
@@ -7903,6 +8156,14 @@
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 *DiskTypesListCall) Context(ctx context.Context) *DiskTypesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DiskTypesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7930,6 +8191,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8014,6 +8278,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AggregatedList: Retrieves the list of disks grouped by scope.
@@ -8085,6 +8350,14 @@
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 *DisksAggregatedListCall) Context(ctx context.Context) *DisksAggregatedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DisksAggregatedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8111,6 +8384,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8190,6 +8466,7 @@
disk string
snapshot *Snapshot
opt_ map[string]interface{}
+ ctx_ context.Context
}
// CreateSnapshot: Creates a snapshot of this disk.
@@ -8211,6 +8488,14 @@
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 *DisksCreateSnapshotCall) Context(ctx context.Context) *DisksCreateSnapshotCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.snapshot)
@@ -8233,6 +8518,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8305,6 +8593,7 @@
zone string
disk string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified persistent disk. Deleting a disk
@@ -8328,6 +8617,14 @@
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 *DisksDeleteCall) Context(ctx context.Context) *DisksDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DisksDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8344,6 +8641,9 @@
"disk": c.disk,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8413,6 +8713,7 @@
zone string
disk string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns a specified persistent disk.
@@ -8433,6 +8734,14 @@
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 *DisksGetCall) Context(ctx context.Context) *DisksGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DisksGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8449,6 +8758,9 @@
"disk": c.disk,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8519,6 +8831,7 @@
zone string
disk *Disk
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a persistent disk in the specified project using the
@@ -8547,6 +8860,14 @@
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 *DisksInsertCall) Context(ctx context.Context) *DisksInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DisksInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.disk)
@@ -8571,6 +8892,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8639,6 +8963,7 @@
project string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of persistent disks contained within the
@@ -8712,6 +9037,14 @@
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 *DisksListCall) Context(ctx context.Context) *DisksListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DisksListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8739,6 +9072,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8824,6 +9160,7 @@
project string
firewall string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified firewall resource.
@@ -8843,6 +9180,14 @@
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 *FirewallsDeleteCall) Context(ctx context.Context) *FirewallsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FirewallsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8858,6 +9203,9 @@
"firewall": c.firewall,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8918,6 +9266,7 @@
project string
firewall string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified firewall resource.
@@ -8937,6 +9286,14 @@
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 *FirewallsGetCall) Context(ctx context.Context) *FirewallsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FirewallsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8952,6 +9309,9 @@
"firewall": c.firewall,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9013,6 +9373,7 @@
project string
firewall *Firewall
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a firewall resource in the specified project using
@@ -9033,6 +9394,14 @@
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 *FirewallsInsertCall) Context(ctx context.Context) *FirewallsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FirewallsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall)
@@ -9053,6 +9422,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9107,6 +9479,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of firewall resources available to the
@@ -9179,6 +9552,14 @@
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 *FirewallsListCall) Context(ctx context.Context) *FirewallsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FirewallsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9205,6 +9586,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9283,6 +9667,7 @@
firewall string
firewall2 *Firewall
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates the specified firewall resource with the data included
@@ -9304,6 +9689,14 @@
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 *FirewallsPatchCall) Context(ctx context.Context) *FirewallsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FirewallsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall2)
@@ -9325,6 +9718,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9389,6 +9785,7 @@
firewall string
firewall2 *Firewall
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates the specified firewall resource with the data
@@ -9410,6 +9807,14 @@
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 *FirewallsUpdateCall) Context(ctx context.Context) *FirewallsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FirewallsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall2)
@@ -9431,6 +9836,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9493,6 +9901,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AggregatedList: Retrieves the list of forwarding rules grouped by
@@ -9565,6 +9974,14 @@
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 *ForwardingRulesAggregatedListCall) Context(ctx context.Context) *ForwardingRulesAggregatedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ForwardingRulesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9591,6 +10008,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9669,6 +10089,7 @@
region string
forwardingRule string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified ForwardingRule resource.
@@ -9689,6 +10110,14 @@
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 *ForwardingRulesDeleteCall) Context(ctx context.Context) *ForwardingRulesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9705,6 +10134,9 @@
"forwardingRule": c.forwardingRule,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9774,6 +10206,7 @@
region string
forwardingRule string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified ForwardingRule resource.
@@ -9794,6 +10227,14 @@
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 *ForwardingRulesGetCall) Context(ctx context.Context) *ForwardingRulesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9810,6 +10251,9 @@
"forwardingRule": c.forwardingRule,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9880,6 +10324,7 @@
region string
forwardingrule *ForwardingRule
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a ForwardingRule resource in the specified project
@@ -9901,6 +10346,14 @@
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 *ForwardingRulesInsertCall) Context(ctx context.Context) *ForwardingRulesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule)
@@ -9922,6 +10375,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9985,6 +10441,7 @@
project string
region string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of ForwardingRule resources available to the
@@ -10058,6 +10515,14 @@
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 *ForwardingRulesListCall) Context(ctx context.Context) *ForwardingRulesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ForwardingRulesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10085,6 +10550,9 @@
"region": c.region,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10172,6 +10640,7 @@
forwardingRule string
targetreference *TargetReference
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetTarget: Changes target url for forwarding rule.
@@ -10193,6 +10662,14 @@
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 *ForwardingRulesSetTargetCall) Context(ctx context.Context) *ForwardingRulesSetTargetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference)
@@ -10215,6 +10692,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10286,6 +10766,7 @@
project string
address string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified address resource.
@@ -10305,6 +10786,14 @@
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 *GlobalAddressesDeleteCall) Context(ctx context.Context) *GlobalAddressesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalAddressesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10320,6 +10809,9 @@
"address": c.address,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10380,6 +10872,7 @@
project string
address string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified address resource.
@@ -10399,6 +10892,14 @@
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 *GlobalAddressesGetCall) Context(ctx context.Context) *GlobalAddressesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalAddressesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10414,6 +10915,9 @@
"address": c.address,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10475,6 +10979,7 @@
project string
address *Address
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates an address resource in the specified project using
@@ -10495,6 +11000,14 @@
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 *GlobalAddressesInsertCall) Context(ctx context.Context) *GlobalAddressesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalAddressesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.address)
@@ -10515,6 +11028,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10569,6 +11085,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of global address resources.
@@ -10640,6 +11157,14 @@
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 *GlobalAddressesListCall) Context(ctx context.Context) *GlobalAddressesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalAddressesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10666,6 +11191,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10743,6 +11271,7 @@
project string
forwardingRule string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified ForwardingRule resource.
@@ -10762,6 +11291,14 @@
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 *GlobalForwardingRulesDeleteCall) Context(ctx context.Context) *GlobalForwardingRulesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10777,6 +11314,9 @@
"forwardingRule": c.forwardingRule,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10837,6 +11377,7 @@
project string
forwardingRule string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified ForwardingRule resource.
@@ -10856,6 +11397,14 @@
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 *GlobalForwardingRulesGetCall) Context(ctx context.Context) *GlobalForwardingRulesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10871,6 +11420,9 @@
"forwardingRule": c.forwardingRule,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10932,6 +11484,7 @@
project string
forwardingrule *ForwardingRule
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a ForwardingRule resource in the specified project
@@ -10952,6 +11505,14 @@
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 *GlobalForwardingRulesInsertCall) Context(ctx context.Context) *GlobalForwardingRulesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule)
@@ -10972,6 +11533,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11026,6 +11590,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of ForwardingRule resources available to the
@@ -11098,6 +11663,14 @@
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 *GlobalForwardingRulesListCall) Context(ctx context.Context) *GlobalForwardingRulesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalForwardingRulesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -11124,6 +11697,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11202,6 +11778,7 @@
forwardingRule string
targetreference *TargetReference
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetTarget: Changes target url for forwarding rule.
@@ -11222,6 +11799,14 @@
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 *GlobalForwardingRulesSetTargetCall) Context(ctx context.Context) *GlobalForwardingRulesSetTargetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference)
@@ -11243,6 +11828,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11305,6 +11893,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AggregatedList: Retrieves the list of all operations grouped by
@@ -11377,6 +11966,14 @@
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 *GlobalOperationsAggregatedListCall) Context(ctx context.Context) *GlobalOperationsAggregatedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalOperationsAggregatedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -11403,6 +12000,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11480,6 +12080,7 @@
project string
operation string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified Operations resource.
@@ -11499,6 +12100,14 @@
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 *GlobalOperationsDeleteCall) Context(ctx context.Context) *GlobalOperationsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -11514,6 +12123,9 @@
"operation": c.operation,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11567,6 +12179,7 @@
project string
operation string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves the specified Operations resource.
@@ -11586,6 +12199,14 @@
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 *GlobalOperationsGetCall) Context(ctx context.Context) *GlobalOperationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalOperationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -11601,6 +12222,9 @@
"operation": c.operation,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11661,6 +12285,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of Operation resources contained within the
@@ -11733,6 +12358,14 @@
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 *GlobalOperationsListCall) Context(ctx context.Context) *GlobalOperationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalOperationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -11759,6 +12392,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11836,6 +12472,7 @@
project string
httpHealthCheck string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified HttpHealthCheck resource.
@@ -11855,6 +12492,14 @@
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 *HttpHealthChecksDeleteCall) Context(ctx context.Context) *HttpHealthChecksDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *HttpHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -11870,6 +12515,9 @@
"httpHealthCheck": c.httpHealthCheck,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11930,6 +12578,7 @@
project string
httpHealthCheck string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified HttpHealthCheck resource.
@@ -11949,6 +12598,14 @@
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 *HttpHealthChecksGetCall) Context(ctx context.Context) *HttpHealthChecksGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *HttpHealthChecksGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -11964,6 +12621,9 @@
"httpHealthCheck": c.httpHealthCheck,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12025,6 +12685,7 @@
project string
httphealthcheck *HttpHealthCheck
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a HttpHealthCheck resource in the specified project
@@ -12045,6 +12706,14 @@
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 *HttpHealthChecksInsertCall) Context(ctx context.Context) *HttpHealthChecksInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *HttpHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck)
@@ -12065,6 +12734,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12119,6 +12791,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of HttpHealthCheck resources available to
@@ -12191,6 +12864,14 @@
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 *HttpHealthChecksListCall) Context(ctx context.Context) *HttpHealthChecksListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *HttpHealthChecksListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -12217,6 +12898,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12295,6 +12979,7 @@
httpHealthCheck string
httphealthcheck *HttpHealthCheck
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a HttpHealthCheck resource in the specified project
@@ -12317,6 +13002,14 @@
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 *HttpHealthChecksPatchCall) Context(ctx context.Context) *HttpHealthChecksPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *HttpHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck)
@@ -12338,6 +13031,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12402,6 +13098,7 @@
httpHealthCheck string
httphealthcheck *HttpHealthCheck
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a HttpHealthCheck resource in the specified project
@@ -12423,6 +13120,14 @@
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 *HttpHealthChecksUpdateCall) Context(ctx context.Context) *HttpHealthChecksUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *HttpHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck)
@@ -12444,6 +13149,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12507,6 +13215,7 @@
project string
httpsHealthCheck string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified HttpsHealthCheck resource.
@@ -12525,6 +13234,14 @@
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 *HttpsHealthChecksDeleteCall) Context(ctx context.Context) *HttpsHealthChecksDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *HttpsHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -12540,6 +13257,9 @@
"httpsHealthCheck": c.httpsHealthCheck,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12600,6 +13320,7 @@
project string
httpsHealthCheck string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified HttpsHealthCheck resource.
@@ -12618,6 +13339,14 @@
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 *HttpsHealthChecksGetCall) Context(ctx context.Context) *HttpsHealthChecksGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *HttpsHealthChecksGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -12633,6 +13362,9 @@
"httpsHealthCheck": c.httpsHealthCheck,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12694,6 +13426,7 @@
project string
httpshealthcheck *HttpsHealthCheck
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a HttpsHealthCheck resource in the specified project
@@ -12713,6 +13446,14 @@
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 *HttpsHealthChecksInsertCall) Context(ctx context.Context) *HttpsHealthChecksInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *HttpsHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpshealthcheck)
@@ -12733,6 +13474,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12787,6 +13531,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of HttpsHealthCheck resources available to
@@ -12858,6 +13603,14 @@
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 *HttpsHealthChecksListCall) Context(ctx context.Context) *HttpsHealthChecksListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *HttpsHealthChecksListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -12884,6 +13637,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12962,6 +13718,7 @@
httpsHealthCheck string
httpshealthcheck *HttpsHealthCheck
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a HttpsHealthCheck resource in the specified project
@@ -12983,6 +13740,14 @@
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 *HttpsHealthChecksPatchCall) Context(ctx context.Context) *HttpsHealthChecksPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *HttpsHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpshealthcheck)
@@ -13004,6 +13769,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13068,6 +13836,7 @@
httpsHealthCheck string
httpshealthcheck *HttpsHealthCheck
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a HttpsHealthCheck resource in the specified project
@@ -13088,6 +13857,14 @@
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 *HttpsHealthChecksUpdateCall) Context(ctx context.Context) *HttpsHealthChecksUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *HttpsHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpshealthcheck)
@@ -13109,6 +13886,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13172,6 +13952,7 @@
project string
image string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified image resource.
@@ -13191,6 +13972,14 @@
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 *ImagesDeleteCall) Context(ctx context.Context) *ImagesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ImagesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13206,6 +13995,9 @@
"image": c.image,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13267,6 +14059,7 @@
image string
deprecationstatus *DeprecationStatus
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Deprecate: Sets the deprecation status of an image.
@@ -13290,6 +14083,14 @@
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 *ImagesDeprecateCall) Context(ctx context.Context) *ImagesDeprecateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ImagesDeprecateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.deprecationstatus)
@@ -13311,6 +14112,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13374,6 +14178,7 @@
project string
image string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified image resource.
@@ -13393,6 +14198,14 @@
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 *ImagesGetCall) Context(ctx context.Context) *ImagesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ImagesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13408,6 +14221,9 @@
"image": c.image,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13469,6 +14285,7 @@
project string
image *Image
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates an image resource in the specified project using the
@@ -13489,6 +14306,14 @@
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 *ImagesInsertCall) Context(ctx context.Context) *ImagesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ImagesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.image)
@@ -13509,6 +14334,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13566,6 +14394,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of image resources available to the
@@ -13638,6 +14467,14 @@
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 *ImagesListCall) Context(ctx context.Context) *ImagesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ImagesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13664,6 +14501,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13743,6 +14583,7 @@
instanceGroupManager string
instancegroupmanagersabandoninstancesrequest *InstanceGroupManagersAbandonInstancesRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AbandonInstances: Removes the specified instances from the managed
@@ -13767,6 +14608,14 @@
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 *InstanceGroupManagersAbandonInstancesCall) Context(ctx context.Context) *InstanceGroupManagersAbandonInstancesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersabandoninstancesrequest)
@@ -13789,6 +14638,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13857,6 +14709,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AggregatedList: Retrieves the list of managed instance groups, and
@@ -13928,6 +14781,14 @@
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 *InstanceGroupManagersAggregatedListCall) Context(ctx context.Context) *InstanceGroupManagersAggregatedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersAggregatedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13954,6 +14815,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14032,6 +14896,7 @@
zone string
instanceGroupManager string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified managed instance group resource.
@@ -14051,6 +14916,14 @@
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 *InstanceGroupManagersDeleteCall) Context(ctx context.Context) *InstanceGroupManagersDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -14067,6 +14940,9 @@
"instanceGroupManager": c.instanceGroupManager,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14135,6 +15011,7 @@
instanceGroupManager string
instancegroupmanagersdeleteinstancesrequest *InstanceGroupManagersDeleteInstancesRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// DeleteInstances: Deletes the specified instances. The instances are
@@ -14159,6 +15036,14 @@
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 *InstanceGroupManagersDeleteInstancesCall) Context(ctx context.Context) *InstanceGroupManagersDeleteInstancesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersdeleteinstancesrequest)
@@ -14181,6 +15066,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14251,6 +15139,7 @@
zone string
instanceGroupManager string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified managed instance group resource.
@@ -14270,6 +15159,14 @@
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 *InstanceGroupManagersGetCall) Context(ctx context.Context) *InstanceGroupManagersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -14286,6 +15183,9 @@
"instanceGroupManager": c.instanceGroupManager,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14354,6 +15254,7 @@
zone string
instancegroupmanager *InstanceGroupManager
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a managed instance group resource in the specified
@@ -14374,6 +15275,14 @@
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 *InstanceGroupManagersInsertCall) Context(ctx context.Context) *InstanceGroupManagersInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager)
@@ -14395,6 +15304,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14457,6 +15369,7 @@
project string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of managed instance groups that are contained
@@ -14529,6 +15442,14 @@
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 *InstanceGroupManagersListCall) Context(ctx context.Context) *InstanceGroupManagersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -14556,6 +15477,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14641,6 +15565,7 @@
zone string
instanceGroupManager string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ListManagedInstances: Lists managed instances.
@@ -14660,6 +15585,14 @@
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 *InstanceGroupManagersListManagedInstancesCall) Context(ctx context.Context) *InstanceGroupManagersListManagedInstancesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -14676,6 +15609,9 @@
"instanceGroupManager": c.instanceGroupManager,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14745,6 +15681,7 @@
instanceGroupManager string
instancegroupmanagersrecreateinstancesrequest *InstanceGroupManagersRecreateInstancesRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// RecreateInstances: Recreates the specified instances. The instances
@@ -14767,6 +15704,14 @@
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 *InstanceGroupManagersRecreateInstancesCall) Context(ctx context.Context) *InstanceGroupManagersRecreateInstancesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersrecreateinstancesrequest)
@@ -14789,6 +15734,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14860,6 +15808,7 @@
instanceGroupManager string
size int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Resize: Resizes the managed instance group. If you increase the size,
@@ -14883,6 +15832,14 @@
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 *InstanceGroupManagersResizeCall) Context(ctx context.Context) *InstanceGroupManagersResizeCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -14900,6 +15857,9 @@
"instanceGroupManager": c.instanceGroupManager,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14976,6 +15936,7 @@
instanceGroupManager string
instancegroupmanagerssetautohealingrequest *InstanceGroupManagersSetAutoHealingRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetAutoHealingPolicies: Modifies the autohealing policy.
@@ -14996,6 +15957,14 @@
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 *InstanceGroupManagersSetAutoHealingPoliciesCall) Context(ctx context.Context) *InstanceGroupManagersSetAutoHealingPoliciesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersSetAutoHealingPoliciesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerssetautohealingrequest)
@@ -15018,6 +15987,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15089,6 +16061,7 @@
instanceGroupManager string
instancegroupmanagerssetinstancetemplaterequest *InstanceGroupManagersSetInstanceTemplateRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetInstanceTemplate: Specifies the instance template to use when
@@ -15111,6 +16084,14 @@
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 *InstanceGroupManagersSetInstanceTemplateCall) Context(ctx context.Context) *InstanceGroupManagersSetInstanceTemplateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerssetinstancetemplaterequest)
@@ -15133,6 +16114,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15204,6 +16188,7 @@
instanceGroupManager string
instancegroupmanagerssettargetpoolsrequest *InstanceGroupManagersSetTargetPoolsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetTargetPools: Modifies the target pools to which all new instances
@@ -15226,6 +16211,14 @@
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 *InstanceGroupManagersSetTargetPoolsCall) Context(ctx context.Context) *InstanceGroupManagersSetTargetPoolsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerssettargetpoolsrequest)
@@ -15248,6 +16241,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15319,6 +16315,7 @@
instanceGroup string
instancegroupsaddinstancesrequest *InstanceGroupsAddInstancesRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AddInstances: Adds a list of instances to an instance group. All of
@@ -15340,6 +16337,14 @@
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 *InstanceGroupsAddInstancesCall) Context(ctx context.Context) *InstanceGroupsAddInstancesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupsAddInstancesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupsaddinstancesrequest)
@@ -15362,6 +16367,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15430,6 +16438,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AggregatedList: Retrieves the list of instance groups, and sorts them
@@ -15501,6 +16510,14 @@
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 *InstanceGroupsAggregatedListCall) Context(ctx context.Context) *InstanceGroupsAggregatedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -15527,6 +16544,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15605,6 +16625,7 @@
zone string
instanceGroup string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified instance group.
@@ -15624,6 +16645,14 @@
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 *InstanceGroupsDeleteCall) Context(ctx context.Context) *InstanceGroupsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -15640,6 +16669,9 @@
"instanceGroup": c.instanceGroup,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15707,6 +16739,7 @@
zone string
instanceGroup string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified instance group resource.
@@ -15726,6 +16759,14 @@
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 *InstanceGroupsGetCall) Context(ctx context.Context) *InstanceGroupsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -15742,6 +16783,9 @@
"instanceGroup": c.instanceGroup,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15810,6 +16854,7 @@
zone string
instancegroup *InstanceGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates an instance group in the specified project using the
@@ -15830,6 +16875,14 @@
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 *InstanceGroupsInsertCall) Context(ctx context.Context) *InstanceGroupsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroup)
@@ -15851,6 +16904,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15913,6 +16969,7 @@
project string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of instance groups that are located in the
@@ -15985,6 +17042,14 @@
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 *InstanceGroupsListCall) Context(ctx context.Context) *InstanceGroupsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -16012,6 +17077,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16098,6 +17166,7 @@
instanceGroup string
instancegroupslistinstancesrequest *InstanceGroupsListInstancesRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ListInstances: Lists instances in an instance group. The parameters
@@ -16173,6 +17242,14 @@
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 *InstanceGroupsListInstancesCall) Context(ctx context.Context) *InstanceGroupsListInstancesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupslistinstancesrequest)
@@ -16207,6 +17284,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16303,6 +17383,7 @@
instanceGroup string
instancegroupsremoveinstancesrequest *InstanceGroupsRemoveInstancesRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// RemoveInstances: Removes a list of instances from an instance group.
@@ -16323,6 +17404,14 @@
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 *InstanceGroupsRemoveInstancesCall) Context(ctx context.Context) *InstanceGroupsRemoveInstancesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupsRemoveInstancesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupsremoveinstancesrequest)
@@ -16345,6 +17434,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16416,6 +17508,7 @@
instanceGroup string
instancegroupssetnamedportsrequest *InstanceGroupsSetNamedPortsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetNamedPorts: Sets the named ports in an instance group.
@@ -16436,6 +17529,14 @@
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 *InstanceGroupsSetNamedPortsCall) Context(ctx context.Context) *InstanceGroupsSetNamedPortsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupssetnamedportsrequest)
@@ -16458,6 +17559,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16527,6 +17631,7 @@
project string
instanceTemplate string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified instance template.
@@ -16546,6 +17651,14 @@
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 *InstanceTemplatesDeleteCall) Context(ctx context.Context) *InstanceTemplatesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -16561,6 +17674,9 @@
"instanceTemplate": c.instanceTemplate,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16621,6 +17737,7 @@
project string
instanceTemplate string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified instance template resource.
@@ -16640,6 +17757,14 @@
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 *InstanceTemplatesGetCall) Context(ctx context.Context) *InstanceTemplatesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -16655,6 +17780,9 @@
"instanceTemplate": c.instanceTemplate,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16716,6 +17844,7 @@
project string
instancetemplate *InstanceTemplate
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates an instance template in the specified project using
@@ -16736,6 +17865,14 @@
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 *InstanceTemplatesInsertCall) Context(ctx context.Context) *InstanceTemplatesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceTemplatesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancetemplate)
@@ -16756,6 +17893,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16810,6 +17950,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of instance templates that are contained
@@ -16882,6 +18023,14 @@
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 *InstanceTemplatesListCall) Context(ctx context.Context) *InstanceTemplatesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceTemplatesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -16908,6 +18057,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16988,6 +18140,7 @@
networkInterface string
accessconfig *AccessConfig
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AddAccessConfig: Adds an access config to an instance's network
@@ -17011,6 +18164,14 @@
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 *InstancesAddAccessConfigCall) Context(ctx context.Context) *InstancesAddAccessConfigCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesAddAccessConfigCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.accessconfig)
@@ -17034,6 +18195,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17111,6 +18275,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AggregatedList:
@@ -17182,6 +18347,14 @@
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 *InstancesAggregatedListCall) Context(ctx context.Context) *InstancesAggregatedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -17208,6 +18381,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17286,6 +18462,7 @@
instance string
attacheddisk *AttachedDisk
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AttachDisk: Attaches a Disk resource to an instance.
@@ -17307,6 +18484,14 @@
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 *InstancesAttachDiskCall) Context(ctx context.Context) *InstancesAttachDiskCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesAttachDiskCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.attacheddisk)
@@ -17329,6 +18514,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17401,6 +18589,7 @@
zone string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified Instance resource. For more
@@ -17422,6 +18611,14 @@
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 *InstancesDeleteCall) Context(ctx context.Context) *InstancesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -17438,6 +18635,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17509,6 +18709,7 @@
accessConfig string
networkInterface string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// DeleteAccessConfig: Deletes an access config from an instance's
@@ -17532,6 +18733,14 @@
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 *InstancesDeleteAccessConfigCall) Context(ctx context.Context) *InstancesDeleteAccessConfigCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesDeleteAccessConfigCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -17550,6 +18759,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17634,6 +18846,7 @@
instance string
deviceName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// DetachDisk: Detaches a disk from an instance.
@@ -17655,6 +18868,14 @@
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 *InstancesDetachDiskCall) Context(ctx context.Context) *InstancesDetachDiskCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesDetachDiskCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -17672,6 +18893,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17749,6 +18973,7 @@
zone string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified instance resource.
@@ -17769,6 +18994,14 @@
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 *InstancesGetCall) Context(ctx context.Context) *InstancesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -17785,6 +19018,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17855,6 +19091,7 @@
zone string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetSerialPortOutput: Returns the specified instance's serial port
@@ -17883,6 +19120,14 @@
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 *InstancesGetSerialPortOutputCall) Context(ctx context.Context) *InstancesGetSerialPortOutputCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesGetSerialPortOutputCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -17902,6 +19147,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17981,6 +19229,7 @@
zone string
instance *Instance
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates an instance resource in the specified project using
@@ -18002,6 +19251,14 @@
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 *InstancesInsertCall) Context(ctx context.Context) *InstancesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance)
@@ -18023,6 +19280,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18086,6 +19346,7 @@
project string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of instance resources contained within the
@@ -18159,6 +19420,14 @@
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 *InstancesListCall) Context(ctx context.Context) *InstancesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -18186,6 +19455,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18272,6 +19544,7 @@
zone string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Reset: Performs a hard reset on the instance.
@@ -18292,6 +19565,14 @@
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 *InstancesResetCall) Context(ctx context.Context) *InstancesResetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesResetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -18308,6 +19589,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18379,6 +19663,7 @@
autoDelete bool
deviceName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetDiskAutoDelete: Sets the auto-delete flag for a disk attached to
@@ -18402,6 +19687,14 @@
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 *InstancesSetDiskAutoDeleteCall) Context(ctx context.Context) *InstancesSetDiskAutoDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesSetDiskAutoDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -18420,6 +19713,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18505,6 +19801,7 @@
instance string
metadata *Metadata
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetMetadata: Sets metadata for the specified instance to the data
@@ -18527,6 +19824,14 @@
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 *InstancesSetMetadataCall) Context(ctx context.Context) *InstancesSetMetadataCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesSetMetadataCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.metadata)
@@ -18549,6 +19854,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18622,6 +19930,7 @@
instance string
scheduling *Scheduling
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetScheduling: Sets an instance's scheduling options.
@@ -18643,6 +19952,14 @@
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 *InstancesSetSchedulingCall) Context(ctx context.Context) *InstancesSetSchedulingCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesSetSchedulingCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.scheduling)
@@ -18665,6 +19982,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18738,6 +20058,7 @@
instance string
tags *Tags
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetTags: Sets tags for the specified instance to the data included in
@@ -18760,6 +20081,14 @@
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 *InstancesSetTagsCall) Context(ctx context.Context) *InstancesSetTagsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesSetTagsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.tags)
@@ -18782,6 +20111,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18854,6 +20186,7 @@
zone string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Start: This method starts an instance that was stopped using the
@@ -18876,6 +20209,14 @@
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 *InstancesStartCall) Context(ctx context.Context) *InstancesStartCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesStartCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -18892,6 +20233,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18961,6 +20305,7 @@
zone string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Stop: This method stops a running instance, shutting it down cleanly,
@@ -18987,6 +20332,14 @@
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 *InstancesStopCall) Context(ctx context.Context) *InstancesStopCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesStopCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -19003,6 +20356,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19071,6 +20427,7 @@
project string
license string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified license resource.
@@ -19090,6 +20447,14 @@
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 *LicensesGetCall) Context(ctx context.Context) *LicensesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LicensesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -19105,6 +20470,9 @@
"license": c.license,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19165,6 +20533,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AggregatedList: Retrieves the list of machine type resources grouped
@@ -19237,6 +20606,14 @@
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 *MachineTypesAggregatedListCall) Context(ctx context.Context) *MachineTypesAggregatedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MachineTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -19263,6 +20640,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19341,6 +20721,7 @@
zone string
machineType string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified machine type resource.
@@ -19361,6 +20742,14 @@
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 *MachineTypesGetCall) Context(ctx context.Context) *MachineTypesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MachineTypesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -19377,6 +20766,9 @@
"machineType": c.machineType,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19446,6 +20838,7 @@
project string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of machine type resources available to the
@@ -19519,6 +20912,14 @@
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 *MachineTypesListCall) Context(ctx context.Context) *MachineTypesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MachineTypesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -19546,6 +20947,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19631,6 +21035,7 @@
project string
network string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified network resource.
@@ -19650,6 +21055,14 @@
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 *NetworksDeleteCall) Context(ctx context.Context) *NetworksDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *NetworksDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -19665,6 +21078,9 @@
"network": c.network,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19725,6 +21141,7 @@
project string
network string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified network resource.
@@ -19744,6 +21161,14 @@
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 *NetworksGetCall) Context(ctx context.Context) *NetworksGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *NetworksGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -19759,6 +21184,9 @@
"network": c.network,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19820,6 +21248,7 @@
project string
network *Network
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a network resource in the specified project using the
@@ -19840,6 +21269,14 @@
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 *NetworksInsertCall) Context(ctx context.Context) *NetworksInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *NetworksInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.network)
@@ -19860,6 +21297,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19914,6 +21354,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of network resources available to the
@@ -19986,6 +21427,14 @@
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 *NetworksListCall) Context(ctx context.Context) *NetworksListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *NetworksListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -20012,6 +21461,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20088,6 +21540,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified project resource.
@@ -20106,6 +21559,14 @@
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 *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -20120,6 +21581,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20173,6 +21637,7 @@
project string
metadata *Metadata
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetCommonInstanceMetadata: Sets metadata common to all instances
@@ -20193,6 +21658,14 @@
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 *ProjectsSetCommonInstanceMetadataCall) Context(ctx context.Context) *ProjectsSetCommonInstanceMetadataCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSetCommonInstanceMetadataCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.metadata)
@@ -20213,6 +21686,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20268,6 +21744,7 @@
project string
usageexportlocation *UsageExportLocation
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetUsageExportBucket: Enables the usage export feature and sets the
@@ -20290,6 +21767,14 @@
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 *ProjectsSetUsageExportBucketCall) Context(ctx context.Context) *ProjectsSetUsageExportBucketCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSetUsageExportBucketCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.usageexportlocation)
@@ -20310,6 +21795,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20368,6 +21856,7 @@
project string
usageexportlocation *UsageExportLocation
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetUsageExportCloudStorageBucket: [Deprecated] Use
@@ -20387,6 +21876,14 @@
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 *ProjectsSetUsageExportCloudStorageBucketCall) Context(ctx context.Context) *ProjectsSetUsageExportCloudStorageBucketCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSetUsageExportCloudStorageBucketCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.usageexportlocation)
@@ -20407,6 +21904,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20465,6 +21965,7 @@
region string
operation string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified region-specific Operations resource.
@@ -20485,6 +21986,14 @@
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 *RegionOperationsDeleteCall) Context(ctx context.Context) *RegionOperationsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RegionOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -20501,6 +22010,9 @@
"operation": c.operation,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20563,6 +22075,7 @@
region string
operation string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves the specified region-specific Operations resource.
@@ -20583,6 +22096,14 @@
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 *RegionOperationsGetCall) Context(ctx context.Context) *RegionOperationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RegionOperationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -20599,6 +22120,9 @@
"operation": c.operation,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20668,6 +22192,7 @@
project string
region string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of Operation resources contained within the
@@ -20741,6 +22266,14 @@
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 *RegionOperationsListCall) Context(ctx context.Context) *RegionOperationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RegionOperationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -20768,6 +22301,9 @@
"region": c.region,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20853,6 +22389,7 @@
project string
region string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified region resource.
@@ -20872,6 +22409,14 @@
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 *RegionsGetCall) Context(ctx context.Context) *RegionsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RegionsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -20887,6 +22432,9 @@
"region": c.region,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20947,6 +22495,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of region resources available to the
@@ -21019,6 +22568,14 @@
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 *RegionsListCall) Context(ctx context.Context) *RegionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -21045,6 +22602,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21122,6 +22682,7 @@
project string
route string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified route resource.
@@ -21141,6 +22702,14 @@
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 *RoutesDeleteCall) Context(ctx context.Context) *RoutesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RoutesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -21156,6 +22725,9 @@
"route": c.route,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21216,6 +22788,7 @@
project string
route string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified route resource.
@@ -21235,6 +22808,14 @@
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 *RoutesGetCall) Context(ctx context.Context) *RoutesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RoutesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -21250,6 +22831,9 @@
"route": c.route,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21311,6 +22895,7 @@
project string
route *Route
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a route resource in the specified project using the
@@ -21331,6 +22916,14 @@
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 *RoutesInsertCall) Context(ctx context.Context) *RoutesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RoutesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.route)
@@ -21351,6 +22944,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21405,6 +23001,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of route resources available to the
@@ -21477,6 +23074,14 @@
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 *RoutesListCall) Context(ctx context.Context) *RoutesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RoutesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -21503,6 +23108,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21580,6 +23188,7 @@
project string
snapshot string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified Snapshot resource. Keep in mind that
@@ -21605,6 +23214,14 @@
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 *SnapshotsDeleteCall) Context(ctx context.Context) *SnapshotsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -21620,6 +23237,9 @@
"snapshot": c.snapshot,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21680,6 +23300,7 @@
project string
snapshot string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified Snapshot resource.
@@ -21699,6 +23320,14 @@
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 *SnapshotsGetCall) Context(ctx context.Context) *SnapshotsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SnapshotsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -21714,6 +23343,9 @@
"snapshot": c.snapshot,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21774,6 +23406,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of Snapshot resources contained within the
@@ -21846,6 +23479,14 @@
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 *SnapshotsListCall) Context(ctx context.Context) *SnapshotsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SnapshotsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -21872,6 +23513,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21949,6 +23593,7 @@
project string
sslCertificate string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified SslCertificate resource.
@@ -21967,6 +23612,14 @@
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 *SslCertificatesDeleteCall) Context(ctx context.Context) *SslCertificatesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SslCertificatesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -21982,6 +23635,9 @@
"sslCertificate": c.sslCertificate,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22042,6 +23698,7 @@
project string
sslCertificate string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified SslCertificate resource.
@@ -22060,6 +23717,14 @@
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 *SslCertificatesGetCall) Context(ctx context.Context) *SslCertificatesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SslCertificatesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22075,6 +23740,9 @@
"sslCertificate": c.sslCertificate,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22136,6 +23804,7 @@
project string
sslcertificate *SslCertificate
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a SslCertificate resource in the specified project
@@ -22155,6 +23824,14 @@
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 *SslCertificatesInsertCall) Context(ctx context.Context) *SslCertificatesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SslCertificatesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.sslcertificate)
@@ -22175,6 +23852,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22229,6 +23909,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of SslCertificate resources available to the
@@ -22300,6 +23981,14 @@
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 *SslCertificatesListCall) Context(ctx context.Context) *SslCertificatesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SslCertificatesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22326,6 +24015,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22403,6 +24095,7 @@
project string
targetHttpProxy string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified TargetHttpProxy resource.
@@ -22422,6 +24115,14 @@
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 *TargetHttpProxiesDeleteCall) Context(ctx context.Context) *TargetHttpProxiesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetHttpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22437,6 +24138,9 @@
"targetHttpProxy": c.targetHttpProxy,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22497,6 +24201,7 @@
project string
targetHttpProxy string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified TargetHttpProxy resource.
@@ -22516,6 +24221,14 @@
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 *TargetHttpProxiesGetCall) Context(ctx context.Context) *TargetHttpProxiesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetHttpProxiesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22531,6 +24244,9 @@
"targetHttpProxy": c.targetHttpProxy,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22592,6 +24308,7 @@
project string
targethttpproxy *TargetHttpProxy
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a TargetHttpProxy resource in the specified project
@@ -22612,6 +24329,14 @@
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 *TargetHttpProxiesInsertCall) Context(ctx context.Context) *TargetHttpProxiesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetHttpProxiesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targethttpproxy)
@@ -22632,6 +24357,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22686,6 +24414,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of TargetHttpProxy resources available to
@@ -22758,6 +24487,14 @@
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 *TargetHttpProxiesListCall) Context(ctx context.Context) *TargetHttpProxiesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetHttpProxiesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22784,6 +24521,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22862,6 +24602,7 @@
targetHttpProxy string
urlmapreference *UrlMapReference
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetUrlMap: Changes the URL map for TargetHttpProxy.
@@ -22882,6 +24623,14 @@
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 *TargetHttpProxiesSetUrlMapCall) Context(ctx context.Context) *TargetHttpProxiesSetUrlMapCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetHttpProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapreference)
@@ -22903,6 +24652,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22966,6 +24718,7 @@
project string
targetHttpsProxy string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified TargetHttpsProxy resource.
@@ -22984,6 +24737,14 @@
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 *TargetHttpsProxiesDeleteCall) Context(ctx context.Context) *TargetHttpsProxiesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetHttpsProxiesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22999,6 +24760,9 @@
"targetHttpsProxy": c.targetHttpsProxy,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23059,6 +24823,7 @@
project string
targetHttpsProxy string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified TargetHttpsProxy resource.
@@ -23077,6 +24842,14 @@
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 *TargetHttpsProxiesGetCall) Context(ctx context.Context) *TargetHttpsProxiesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetHttpsProxiesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -23092,6 +24865,9 @@
"targetHttpsProxy": c.targetHttpsProxy,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23153,6 +24929,7 @@
project string
targethttpsproxy *TargetHttpsProxy
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a TargetHttpsProxy resource in the specified project
@@ -23172,6 +24949,14 @@
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 *TargetHttpsProxiesInsertCall) Context(ctx context.Context) *TargetHttpsProxiesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetHttpsProxiesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targethttpsproxy)
@@ -23192,6 +24977,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23246,6 +25034,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of TargetHttpsProxy resources available to
@@ -23317,6 +25106,14 @@
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 *TargetHttpsProxiesListCall) Context(ctx context.Context) *TargetHttpsProxiesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetHttpsProxiesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -23343,6 +25140,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23421,6 +25221,7 @@
targetHttpsProxy string
targethttpsproxiessetsslcertificatesrequest *TargetHttpsProxiesSetSslCertificatesRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetSslCertificates: Replaces SslCertificates for TargetHttpsProxy.
@@ -23440,6 +25241,14 @@
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 *TargetHttpsProxiesSetSslCertificatesCall) Context(ctx context.Context) *TargetHttpsProxiesSetSslCertificatesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetHttpsProxiesSetSslCertificatesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targethttpsproxiessetsslcertificatesrequest)
@@ -23461,6 +25270,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23525,6 +25337,7 @@
targetHttpsProxy string
urlmapreference *UrlMapReference
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetUrlMap: Changes the URL map for TargetHttpsProxy.
@@ -23544,6 +25357,14 @@
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 *TargetHttpsProxiesSetUrlMapCall) Context(ctx context.Context) *TargetHttpsProxiesSetUrlMapCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetHttpsProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapreference)
@@ -23565,6 +25386,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23627,6 +25451,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AggregatedList: Retrieves the list of target instances grouped by
@@ -23699,6 +25524,14 @@
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 *TargetInstancesAggregatedListCall) Context(ctx context.Context) *TargetInstancesAggregatedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetInstancesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -23725,6 +25558,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23803,6 +25639,7 @@
zone string
targetInstance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified TargetInstance resource.
@@ -23823,6 +25660,14 @@
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 *TargetInstancesDeleteCall) Context(ctx context.Context) *TargetInstancesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetInstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -23839,6 +25684,9 @@
"targetInstance": c.targetInstance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23908,6 +25756,7 @@
zone string
targetInstance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified TargetInstance resource.
@@ -23928,6 +25777,14 @@
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 *TargetInstancesGetCall) Context(ctx context.Context) *TargetInstancesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetInstancesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -23944,6 +25801,9 @@
"targetInstance": c.targetInstance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24014,6 +25874,7 @@
zone string
targetinstance *TargetInstance
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a TargetInstance resource in the specified project
@@ -24035,6 +25896,14 @@
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 *TargetInstancesInsertCall) Context(ctx context.Context) *TargetInstancesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetInstancesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetinstance)
@@ -24056,6 +25925,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24119,6 +25991,7 @@
project string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of TargetInstance resources available to the
@@ -24192,6 +26065,14 @@
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 *TargetInstancesListCall) Context(ctx context.Context) *TargetInstancesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetInstancesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -24219,6 +26100,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24306,6 +26190,7 @@
targetPool string
targetpoolsaddhealthcheckrequest *TargetPoolsAddHealthCheckRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AddHealthCheck: Adds health check URL to targetPool.
@@ -24327,6 +26212,14 @@
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 *TargetPoolsAddHealthCheckCall) Context(ctx context.Context) *TargetPoolsAddHealthCheckCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetPoolsAddHealthCheckCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsaddhealthcheckrequest)
@@ -24349,6 +26242,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24421,6 +26317,7 @@
targetPool string
targetpoolsaddinstancerequest *TargetPoolsAddInstanceRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AddInstance: Adds instance url to targetPool.
@@ -24442,6 +26339,14 @@
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 *TargetPoolsAddInstanceCall) Context(ctx context.Context) *TargetPoolsAddInstanceCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetPoolsAddInstanceCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsaddinstancerequest)
@@ -24464,6 +26369,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24533,6 +26441,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AggregatedList: Retrieves the list of target pools grouped by scope.
@@ -24604,6 +26513,14 @@
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 *TargetPoolsAggregatedListCall) Context(ctx context.Context) *TargetPoolsAggregatedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetPoolsAggregatedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -24630,6 +26547,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24708,6 +26628,7 @@
region string
targetPool string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified TargetPool resource.
@@ -24728,6 +26649,14 @@
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 *TargetPoolsDeleteCall) Context(ctx context.Context) *TargetPoolsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetPoolsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -24744,6 +26673,9 @@
"targetPool": c.targetPool,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24813,6 +26745,7 @@
region string
targetPool string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified TargetPool resource.
@@ -24833,6 +26766,14 @@
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 *TargetPoolsGetCall) Context(ctx context.Context) *TargetPoolsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetPoolsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -24849,6 +26790,9 @@
"targetPool": c.targetPool,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24920,6 +26864,7 @@
targetPool string
instancereference *InstanceReference
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetHealth: Gets the most recent health check results for each IP for
@@ -24942,6 +26887,14 @@
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 *TargetPoolsGetHealthCall) Context(ctx context.Context) *TargetPoolsGetHealthCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetPoolsGetHealthCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancereference)
@@ -24964,6 +26917,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -25036,6 +26992,7 @@
region string
targetpool *TargetPool
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a TargetPool resource in the specified project and
@@ -25057,6 +27014,14 @@
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 *TargetPoolsInsertCall) Context(ctx context.Context) *TargetPoolsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetPoolsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpool)
@@ -25078,6 +27043,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -25141,6 +27109,7 @@
project string
region string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of TargetPool resources available to the
@@ -25214,6 +27183,14 @@
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 *TargetPoolsListCall) Context(ctx context.Context) *TargetPoolsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetPoolsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -25241,6 +27218,9 @@
"region": c.region,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -25328,6 +27308,7 @@
targetPool string
targetpoolsremovehealthcheckrequest *TargetPoolsRemoveHealthCheckRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// RemoveHealthCheck: Removes health check URL from targetPool.
@@ -25349,6 +27330,14 @@
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 *TargetPoolsRemoveHealthCheckCall) Context(ctx context.Context) *TargetPoolsRemoveHealthCheckCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetPoolsRemoveHealthCheckCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsremovehealthcheckrequest)
@@ -25371,6 +27360,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -25443,6 +27435,7 @@
targetPool string
targetpoolsremoveinstancerequest *TargetPoolsRemoveInstanceRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// RemoveInstance: Removes instance URL from targetPool.
@@ -25464,6 +27457,14 @@
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 *TargetPoolsRemoveInstanceCall) Context(ctx context.Context) *TargetPoolsRemoveInstanceCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetPoolsRemoveInstanceCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsremoveinstancerequest)
@@ -25486,6 +27487,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -25558,6 +27562,7 @@
targetPool string
targetreference *TargetReference
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetBackup: Changes backup pool configurations.
@@ -25586,6 +27591,14 @@
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 *TargetPoolsSetBackupCall) Context(ctx context.Context) *TargetPoolsSetBackupCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetPoolsSetBackupCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference)
@@ -25611,6 +27624,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -25687,6 +27703,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AggregatedList: Retrieves the list of target VPN gateways grouped by
@@ -25758,6 +27775,14 @@
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 *TargetVpnGatewaysAggregatedListCall) Context(ctx context.Context) *TargetVpnGatewaysAggregatedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetVpnGatewaysAggregatedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -25784,6 +27809,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -25862,6 +27890,7 @@
region string
targetVpnGateway string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified TargetVpnGateway resource.
@@ -25881,6 +27910,14 @@
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 *TargetVpnGatewaysDeleteCall) Context(ctx context.Context) *TargetVpnGatewaysDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetVpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -25897,6 +27934,9 @@
"targetVpnGateway": c.targetVpnGateway,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -25966,6 +28006,7 @@
region string
targetVpnGateway string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified TargetVpnGateway resource.
@@ -25985,6 +28026,14 @@
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 *TargetVpnGatewaysGetCall) Context(ctx context.Context) *TargetVpnGatewaysGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetVpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -26001,6 +28050,9 @@
"targetVpnGateway": c.targetVpnGateway,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26071,6 +28123,7 @@
region string
targetvpngateway *TargetVpnGateway
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a TargetVpnGateway resource in the specified project
@@ -26091,6 +28144,14 @@
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 *TargetVpnGatewaysInsertCall) Context(ctx context.Context) *TargetVpnGatewaysInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetVpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetvpngateway)
@@ -26112,6 +28173,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26175,6 +28239,7 @@
project string
region string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of TargetVpnGateway resources available to
@@ -26247,6 +28312,14 @@
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 *TargetVpnGatewaysListCall) Context(ctx context.Context) *TargetVpnGatewaysListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetVpnGatewaysListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -26274,6 +28347,9 @@
"region": c.region,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26359,6 +28435,7 @@
project string
urlMap string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified UrlMap resource.
@@ -26378,6 +28455,14 @@
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 *UrlMapsDeleteCall) Context(ctx context.Context) *UrlMapsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UrlMapsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -26393,6 +28478,9 @@
"urlMap": c.urlMap,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26453,6 +28541,7 @@
project string
urlMap string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified UrlMap resource.
@@ -26472,6 +28561,14 @@
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 *UrlMapsGetCall) Context(ctx context.Context) *UrlMapsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UrlMapsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -26487,6 +28584,9 @@
"urlMap": c.urlMap,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26548,6 +28648,7 @@
project string
urlmap *UrlMap
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a UrlMap resource in the specified project using the
@@ -26568,6 +28669,14 @@
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 *UrlMapsInsertCall) Context(ctx context.Context) *UrlMapsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UrlMapsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap)
@@ -26588,6 +28697,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26642,6 +28754,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of UrlMap resources available to the
@@ -26714,6 +28827,14 @@
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 *UrlMapsListCall) Context(ctx context.Context) *UrlMapsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UrlMapsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -26740,6 +28861,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26818,6 +28942,7 @@
urlMap string
urlmap *UrlMap
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Update the entire content of the UrlMap resource. This method
@@ -26839,6 +28964,14 @@
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 *UrlMapsPatchCall) Context(ctx context.Context) *UrlMapsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UrlMapsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap)
@@ -26860,6 +28993,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26924,6 +29060,7 @@
urlMap string
urlmap *UrlMap
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Update the entire content of the UrlMap resource.
@@ -26944,6 +29081,14 @@
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 *UrlMapsUpdateCall) Context(ctx context.Context) *UrlMapsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UrlMapsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap)
@@ -26965,6 +29110,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -27029,6 +29177,7 @@
urlMap string
urlmapsvalidaterequest *UrlMapsValidateRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Validate: Run static validation for the UrlMap. In particular, the
@@ -27051,6 +29200,14 @@
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 *UrlMapsValidateCall) Context(ctx context.Context) *UrlMapsValidateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UrlMapsValidateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapsvalidaterequest)
@@ -27072,6 +29229,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -27134,6 +29294,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AggregatedList: Retrieves the list of VPN tunnels grouped by scope.
@@ -27204,6 +29365,14 @@
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 *VpnTunnelsAggregatedListCall) Context(ctx context.Context) *VpnTunnelsAggregatedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VpnTunnelsAggregatedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -27230,6 +29399,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -27308,6 +29480,7 @@
region string
vpnTunnel string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified VpnTunnel resource.
@@ -27327,6 +29500,14 @@
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 *VpnTunnelsDeleteCall) Context(ctx context.Context) *VpnTunnelsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VpnTunnelsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -27343,6 +29524,9 @@
"vpnTunnel": c.vpnTunnel,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -27412,6 +29596,7 @@
region string
vpnTunnel string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified VpnTunnel resource.
@@ -27431,6 +29616,14 @@
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 *VpnTunnelsGetCall) Context(ctx context.Context) *VpnTunnelsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VpnTunnelsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -27447,6 +29640,9 @@
"vpnTunnel": c.vpnTunnel,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -27517,6 +29713,7 @@
region string
vpntunnel *VpnTunnel
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a VpnTunnel resource in the specified project and
@@ -27537,6 +29734,14 @@
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 *VpnTunnelsInsertCall) Context(ctx context.Context) *VpnTunnelsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VpnTunnelsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.vpntunnel)
@@ -27558,6 +29763,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -27621,6 +29829,7 @@
project string
region string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of VpnTunnel resources contained in the
@@ -27693,6 +29902,14 @@
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 *VpnTunnelsListCall) Context(ctx context.Context) *VpnTunnelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VpnTunnelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -27720,6 +29937,9 @@
"region": c.region,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -27806,6 +30026,7 @@
zone string
operation string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified zone-specific Operations resource.
@@ -27826,6 +30047,14 @@
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 *ZoneOperationsDeleteCall) Context(ctx context.Context) *ZoneOperationsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZoneOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -27842,6 +30071,9 @@
"operation": c.operation,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -27904,6 +30136,7 @@
zone string
operation string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves the specified zone-specific Operations resource.
@@ -27924,6 +30157,14 @@
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 *ZoneOperationsGetCall) Context(ctx context.Context) *ZoneOperationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -27940,6 +30181,9 @@
"operation": c.operation,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -28009,6 +30253,7 @@
project string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of Operation resources contained within the
@@ -28082,6 +30327,14 @@
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 *ZoneOperationsListCall) Context(ctx context.Context) *ZoneOperationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZoneOperationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -28109,6 +30362,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -28194,6 +30450,7 @@
project string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified zone resource.
@@ -28213,6 +30470,14 @@
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 *ZonesGetCall) Context(ctx context.Context) *ZonesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZonesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -28228,6 +30493,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -28288,6 +30556,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of zone resources available to the specified
@@ -28360,6 +30629,14 @@
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 *ZonesListCall) Context(ctx context.Context) *ZonesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZonesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -28386,6 +30663,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/compute/v1/compute-gen.go b/compute/v1/compute-gen.go
index 5f8b890..5a2654f 100644
--- a/compute/v1/compute-gen.go
+++ b/compute/v1/compute-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "compute:v1"
const apiName = "compute"
@@ -4826,6 +4826,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AggregatedList: Retrieves the list of addresses grouped by scope.
@@ -4880,6 +4881,14 @@
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 *AddressesAggregatedListCall) Context(ctx context.Context) *AddressesAggregatedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AddressesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4903,6 +4912,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4976,6 +4988,7 @@
region string
address string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified address resource.
@@ -4996,6 +5009,14 @@
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 *AddressesDeleteCall) Context(ctx context.Context) *AddressesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AddressesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5012,6 +5033,9 @@
"address": c.address,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5081,6 +5105,7 @@
region string
address string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified address resource.
@@ -5101,6 +5126,14 @@
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 *AddressesGetCall) Context(ctx context.Context) *AddressesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AddressesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5117,6 +5150,9 @@
"address": c.address,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5187,6 +5223,7 @@
region string
address *Address
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates an address resource in the specified project using
@@ -5208,6 +5245,14 @@
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 *AddressesInsertCall) Context(ctx context.Context) *AddressesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AddressesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.address)
@@ -5229,6 +5274,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5292,6 +5340,7 @@
project string
region string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of address resources contained within the
@@ -5348,6 +5397,14 @@
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 *AddressesListCall) Context(ctx context.Context) *AddressesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AddressesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5372,6 +5429,9 @@
"region": c.region,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5451,6 +5511,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AggregatedList: Retrieves the list of autoscalers grouped by scope.
@@ -5504,6 +5565,14 @@
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 *AutoscalersAggregatedListCall) Context(ctx context.Context) *AutoscalersAggregatedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AutoscalersAggregatedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5527,6 +5596,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5600,6 +5672,7 @@
zone string
autoscaler string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified autoscaler resource.
@@ -5619,6 +5692,14 @@
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 *AutoscalersDeleteCall) Context(ctx context.Context) *AutoscalersDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5635,6 +5716,9 @@
"autoscaler": c.autoscaler,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5704,6 +5788,7 @@
zone string
autoscaler string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified autoscaler resource.
@@ -5723,6 +5808,14 @@
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 *AutoscalersGetCall) Context(ctx context.Context) *AutoscalersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AutoscalersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5739,6 +5832,9 @@
"autoscaler": c.autoscaler,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5809,6 +5905,7 @@
zone string
autoscaler *Autoscaler
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates an autoscaler resource in the specified project using
@@ -5829,6 +5926,14 @@
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 *AutoscalersInsertCall) Context(ctx context.Context) *AutoscalersInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AutoscalersInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler)
@@ -5850,6 +5955,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5913,6 +6021,7 @@
project string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of autoscaler resources contained within the
@@ -5968,6 +6077,14 @@
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 *AutoscalersListCall) Context(ctx context.Context) *AutoscalersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AutoscalersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5992,6 +6109,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6074,6 +6194,7 @@
autoscaler string
autoscaler2 *Autoscaler
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an autoscaler resource in the specified project using
@@ -6096,6 +6217,14 @@
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 *AutoscalersPatchCall) Context(ctx context.Context) *AutoscalersPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AutoscalersPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler2)
@@ -6118,6 +6247,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6190,6 +6322,7 @@
zone string
autoscaler *Autoscaler
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an autoscaler resource in the specified project using
@@ -6217,6 +6350,14 @@
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 *AutoscalersUpdateCall) Context(ctx context.Context) *AutoscalersUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler)
@@ -6241,6 +6382,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6310,6 +6454,7 @@
project string
backendService string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified BackendService resource.
@@ -6329,6 +6474,14 @@
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 *BackendServicesDeleteCall) Context(ctx context.Context) *BackendServicesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BackendServicesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6344,6 +6497,9 @@
"backendService": c.backendService,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6404,6 +6560,7 @@
project string
backendService string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified BackendService resource.
@@ -6423,6 +6580,14 @@
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 *BackendServicesGetCall) Context(ctx context.Context) *BackendServicesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BackendServicesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6438,6 +6603,9 @@
"backendService": c.backendService,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6500,6 +6668,7 @@
backendService string
resourcegroupreference *ResourceGroupReference
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetHealth: Gets the most recent health check results for this
@@ -6521,6 +6690,14 @@
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 *BackendServicesGetHealthCall) Context(ctx context.Context) *BackendServicesGetHealthCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BackendServicesGetHealthCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourcegroupreference)
@@ -6542,6 +6719,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6605,6 +6785,7 @@
project string
backendservice *BackendService
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a BackendService resource in the specified project
@@ -6625,6 +6806,14 @@
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 *BackendServicesInsertCall) Context(ctx context.Context) *BackendServicesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BackendServicesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice)
@@ -6645,6 +6834,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6699,6 +6891,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of BackendService resources available to the
@@ -6754,6 +6947,14 @@
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 *BackendServicesListCall) Context(ctx context.Context) *BackendServicesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BackendServicesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6777,6 +6978,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6850,6 +7054,7 @@
backendService string
backendservice *BackendService
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Update the entire content of the BackendService resource. This
@@ -6871,6 +7076,14 @@
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 *BackendServicesPatchCall) Context(ctx context.Context) *BackendServicesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BackendServicesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice)
@@ -6892,6 +7105,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6956,6 +7172,7 @@
backendService string
backendservice *BackendService
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Update the entire content of the BackendService resource.
@@ -6976,6 +7193,14 @@
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 *BackendServicesUpdateCall) Context(ctx context.Context) *BackendServicesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice)
@@ -6997,6 +7222,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7059,6 +7287,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AggregatedList: Retrieves the list of disk type resources grouped by
@@ -7114,6 +7343,14 @@
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 *DiskTypesAggregatedListCall) Context(ctx context.Context) *DiskTypesAggregatedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DiskTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7137,6 +7374,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7210,6 +7450,7 @@
zone string
diskType string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified disk type resource.
@@ -7230,6 +7471,14 @@
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 *DiskTypesGetCall) Context(ctx context.Context) *DiskTypesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DiskTypesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7246,6 +7495,9 @@
"diskType": c.diskType,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7315,6 +7567,7 @@
project string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of disk type resources available to the
@@ -7371,6 +7624,14 @@
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 *DiskTypesListCall) Context(ctx context.Context) *DiskTypesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DiskTypesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7395,6 +7656,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7474,6 +7738,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AggregatedList: Retrieves the list of disks grouped by scope.
@@ -7528,6 +7793,14 @@
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 *DisksAggregatedListCall) Context(ctx context.Context) *DisksAggregatedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DisksAggregatedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7551,6 +7824,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7625,6 +7901,7 @@
disk string
snapshot *Snapshot
opt_ map[string]interface{}
+ ctx_ context.Context
}
// CreateSnapshot: Creates a snapshot of this disk.
@@ -7646,6 +7923,14 @@
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 *DisksCreateSnapshotCall) Context(ctx context.Context) *DisksCreateSnapshotCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.snapshot)
@@ -7668,6 +7953,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7740,6 +8028,7 @@
zone string
disk string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified persistent disk. Deleting a disk
@@ -7763,6 +8052,14 @@
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 *DisksDeleteCall) Context(ctx context.Context) *DisksDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DisksDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7779,6 +8076,9 @@
"disk": c.disk,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7848,6 +8148,7 @@
zone string
disk string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns a specified persistent disk.
@@ -7868,6 +8169,14 @@
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 *DisksGetCall) Context(ctx context.Context) *DisksGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DisksGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7884,6 +8193,9 @@
"disk": c.disk,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7954,6 +8266,7 @@
zone string
disk *Disk
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a persistent disk in the specified project using the
@@ -7982,6 +8295,14 @@
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 *DisksInsertCall) Context(ctx context.Context) *DisksInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DisksInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.disk)
@@ -8006,6 +8327,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8074,6 +8398,7 @@
project string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of persistent disks contained within the
@@ -8130,6 +8455,14 @@
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 *DisksListCall) Context(ctx context.Context) *DisksListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DisksListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8154,6 +8487,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8234,6 +8570,7 @@
project string
firewall string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified firewall resource.
@@ -8253,6 +8590,14 @@
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 *FirewallsDeleteCall) Context(ctx context.Context) *FirewallsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FirewallsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8268,6 +8613,9 @@
"firewall": c.firewall,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8328,6 +8676,7 @@
project string
firewall string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified firewall resource.
@@ -8347,6 +8696,14 @@
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 *FirewallsGetCall) Context(ctx context.Context) *FirewallsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FirewallsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8362,6 +8719,9 @@
"firewall": c.firewall,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8423,6 +8783,7 @@
project string
firewall *Firewall
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a firewall resource in the specified project using
@@ -8443,6 +8804,14 @@
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 *FirewallsInsertCall) Context(ctx context.Context) *FirewallsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FirewallsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall)
@@ -8463,6 +8832,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8517,6 +8889,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of firewall resources available to the
@@ -8572,6 +8945,14 @@
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 *FirewallsListCall) Context(ctx context.Context) *FirewallsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FirewallsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8595,6 +8976,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8668,6 +9052,7 @@
firewall string
firewall2 *Firewall
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates the specified firewall resource with the data included
@@ -8689,6 +9074,14 @@
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 *FirewallsPatchCall) Context(ctx context.Context) *FirewallsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FirewallsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall2)
@@ -8710,6 +9103,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8774,6 +9170,7 @@
firewall string
firewall2 *Firewall
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates the specified firewall resource with the data
@@ -8795,6 +9192,14 @@
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 *FirewallsUpdateCall) Context(ctx context.Context) *FirewallsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FirewallsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall2)
@@ -8816,6 +9221,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8878,6 +9286,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AggregatedList: Retrieves the list of forwarding rules grouped by
@@ -8933,6 +9342,14 @@
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 *ForwardingRulesAggregatedListCall) Context(ctx context.Context) *ForwardingRulesAggregatedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ForwardingRulesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8956,6 +9373,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9029,6 +9449,7 @@
region string
forwardingRule string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified ForwardingRule resource.
@@ -9049,6 +9470,14 @@
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 *ForwardingRulesDeleteCall) Context(ctx context.Context) *ForwardingRulesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9065,6 +9494,9 @@
"forwardingRule": c.forwardingRule,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9134,6 +9566,7 @@
region string
forwardingRule string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified ForwardingRule resource.
@@ -9154,6 +9587,14 @@
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 *ForwardingRulesGetCall) Context(ctx context.Context) *ForwardingRulesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9170,6 +9611,9 @@
"forwardingRule": c.forwardingRule,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9240,6 +9684,7 @@
region string
forwardingrule *ForwardingRule
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a ForwardingRule resource in the specified project
@@ -9261,6 +9706,14 @@
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 *ForwardingRulesInsertCall) Context(ctx context.Context) *ForwardingRulesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule)
@@ -9282,6 +9735,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9345,6 +9801,7 @@
project string
region string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of ForwardingRule resources available to the
@@ -9401,6 +9858,14 @@
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 *ForwardingRulesListCall) Context(ctx context.Context) *ForwardingRulesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ForwardingRulesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9425,6 +9890,9 @@
"region": c.region,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9507,6 +9975,7 @@
forwardingRule string
targetreference *TargetReference
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetTarget: Changes target url for forwarding rule.
@@ -9528,6 +9997,14 @@
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 *ForwardingRulesSetTargetCall) Context(ctx context.Context) *ForwardingRulesSetTargetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference)
@@ -9550,6 +10027,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9621,6 +10101,7 @@
project string
address string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified address resource.
@@ -9640,6 +10121,14 @@
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 *GlobalAddressesDeleteCall) Context(ctx context.Context) *GlobalAddressesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalAddressesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9655,6 +10144,9 @@
"address": c.address,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9715,6 +10207,7 @@
project string
address string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified address resource.
@@ -9734,6 +10227,14 @@
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 *GlobalAddressesGetCall) Context(ctx context.Context) *GlobalAddressesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalAddressesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9749,6 +10250,9 @@
"address": c.address,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9810,6 +10314,7 @@
project string
address *Address
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates an address resource in the specified project using
@@ -9830,6 +10335,14 @@
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 *GlobalAddressesInsertCall) Context(ctx context.Context) *GlobalAddressesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalAddressesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.address)
@@ -9850,6 +10363,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9904,6 +10420,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of global address resources.
@@ -9958,6 +10475,14 @@
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 *GlobalAddressesListCall) Context(ctx context.Context) *GlobalAddressesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalAddressesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9981,6 +10506,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10053,6 +10581,7 @@
project string
forwardingRule string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified ForwardingRule resource.
@@ -10072,6 +10601,14 @@
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 *GlobalForwardingRulesDeleteCall) Context(ctx context.Context) *GlobalForwardingRulesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalForwardingRulesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10087,6 +10624,9 @@
"forwardingRule": c.forwardingRule,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10147,6 +10687,7 @@
project string
forwardingRule string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified ForwardingRule resource.
@@ -10166,6 +10707,14 @@
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 *GlobalForwardingRulesGetCall) Context(ctx context.Context) *GlobalForwardingRulesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalForwardingRulesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10181,6 +10730,9 @@
"forwardingRule": c.forwardingRule,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10242,6 +10794,7 @@
project string
forwardingrule *ForwardingRule
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a ForwardingRule resource in the specified project
@@ -10262,6 +10815,14 @@
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 *GlobalForwardingRulesInsertCall) Context(ctx context.Context) *GlobalForwardingRulesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalForwardingRulesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule)
@@ -10282,6 +10843,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10336,6 +10900,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of ForwardingRule resources available to the
@@ -10391,6 +10956,14 @@
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 *GlobalForwardingRulesListCall) Context(ctx context.Context) *GlobalForwardingRulesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalForwardingRulesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10414,6 +10987,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10487,6 +11063,7 @@
forwardingRule string
targetreference *TargetReference
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetTarget: Changes target url for forwarding rule.
@@ -10507,6 +11084,14 @@
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 *GlobalForwardingRulesSetTargetCall) Context(ctx context.Context) *GlobalForwardingRulesSetTargetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalForwardingRulesSetTargetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference)
@@ -10528,6 +11113,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10590,6 +11178,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AggregatedList: Retrieves the list of all operations grouped by
@@ -10645,6 +11234,14 @@
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 *GlobalOperationsAggregatedListCall) Context(ctx context.Context) *GlobalOperationsAggregatedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalOperationsAggregatedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10668,6 +11265,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10740,6 +11340,7 @@
project string
operation string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified Operations resource.
@@ -10759,6 +11360,14 @@
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 *GlobalOperationsDeleteCall) Context(ctx context.Context) *GlobalOperationsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10774,6 +11383,9 @@
"operation": c.operation,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10827,6 +11439,7 @@
project string
operation string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves the specified Operations resource.
@@ -10846,6 +11459,14 @@
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 *GlobalOperationsGetCall) Context(ctx context.Context) *GlobalOperationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalOperationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10861,6 +11482,9 @@
"operation": c.operation,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10921,6 +11545,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of Operation resources contained within the
@@ -10976,6 +11601,14 @@
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 *GlobalOperationsListCall) Context(ctx context.Context) *GlobalOperationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GlobalOperationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10999,6 +11632,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11071,6 +11707,7 @@
project string
httpHealthCheck string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified HttpHealthCheck resource.
@@ -11090,6 +11727,14 @@
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 *HttpHealthChecksDeleteCall) Context(ctx context.Context) *HttpHealthChecksDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *HttpHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -11105,6 +11750,9 @@
"httpHealthCheck": c.httpHealthCheck,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11165,6 +11813,7 @@
project string
httpHealthCheck string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified HttpHealthCheck resource.
@@ -11184,6 +11833,14 @@
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 *HttpHealthChecksGetCall) Context(ctx context.Context) *HttpHealthChecksGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *HttpHealthChecksGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -11199,6 +11856,9 @@
"httpHealthCheck": c.httpHealthCheck,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11260,6 +11920,7 @@
project string
httphealthcheck *HttpHealthCheck
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a HttpHealthCheck resource in the specified project
@@ -11280,6 +11941,14 @@
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 *HttpHealthChecksInsertCall) Context(ctx context.Context) *HttpHealthChecksInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *HttpHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck)
@@ -11300,6 +11969,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11354,6 +12026,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of HttpHealthCheck resources available to
@@ -11409,6 +12082,14 @@
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 *HttpHealthChecksListCall) Context(ctx context.Context) *HttpHealthChecksListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *HttpHealthChecksListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -11432,6 +12113,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11505,6 +12189,7 @@
httpHealthCheck string
httphealthcheck *HttpHealthCheck
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a HttpHealthCheck resource in the specified project
@@ -11527,6 +12212,14 @@
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 *HttpHealthChecksPatchCall) Context(ctx context.Context) *HttpHealthChecksPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *HttpHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck)
@@ -11548,6 +12241,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11612,6 +12308,7 @@
httpHealthCheck string
httphealthcheck *HttpHealthCheck
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a HttpHealthCheck resource in the specified project
@@ -11633,6 +12330,14 @@
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 *HttpHealthChecksUpdateCall) Context(ctx context.Context) *HttpHealthChecksUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *HttpHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck)
@@ -11654,6 +12359,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11717,6 +12425,7 @@
project string
image string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified image resource.
@@ -11736,6 +12445,14 @@
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 *ImagesDeleteCall) Context(ctx context.Context) *ImagesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ImagesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -11751,6 +12468,9 @@
"image": c.image,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11812,6 +12532,7 @@
image string
deprecationstatus *DeprecationStatus
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Deprecate: Sets the deprecation status of an image.
@@ -11835,6 +12556,14 @@
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 *ImagesDeprecateCall) Context(ctx context.Context) *ImagesDeprecateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ImagesDeprecateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.deprecationstatus)
@@ -11856,6 +12585,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11919,6 +12651,7 @@
project string
image string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified image resource.
@@ -11938,6 +12671,14 @@
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 *ImagesGetCall) Context(ctx context.Context) *ImagesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ImagesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -11953,6 +12694,9 @@
"image": c.image,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12014,6 +12758,7 @@
project string
image *Image
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates an image resource in the specified project using the
@@ -12034,6 +12779,14 @@
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 *ImagesInsertCall) Context(ctx context.Context) *ImagesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ImagesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.image)
@@ -12054,6 +12807,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12111,6 +12867,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of image resources available to the
@@ -12166,6 +12923,14 @@
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 *ImagesListCall) Context(ctx context.Context) *ImagesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ImagesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -12189,6 +12954,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12263,6 +13031,7 @@
instanceGroupManager string
instancegroupmanagersabandoninstancesrequest *InstanceGroupManagersAbandonInstancesRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AbandonInstances: Removes the specified instances from the managed
@@ -12287,6 +13056,14 @@
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 *InstanceGroupManagersAbandonInstancesCall) Context(ctx context.Context) *InstanceGroupManagersAbandonInstancesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersabandoninstancesrequest)
@@ -12309,6 +13086,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12377,6 +13157,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AggregatedList: Retrieves the list of managed instance groups, and
@@ -12431,6 +13212,14 @@
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 *InstanceGroupManagersAggregatedListCall) Context(ctx context.Context) *InstanceGroupManagersAggregatedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersAggregatedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -12454,6 +13243,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12527,6 +13319,7 @@
zone string
instanceGroupManager string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified managed instance group resource.
@@ -12546,6 +13339,14 @@
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 *InstanceGroupManagersDeleteCall) Context(ctx context.Context) *InstanceGroupManagersDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -12562,6 +13363,9 @@
"instanceGroupManager": c.instanceGroupManager,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12630,6 +13434,7 @@
instanceGroupManager string
instancegroupmanagersdeleteinstancesrequest *InstanceGroupManagersDeleteInstancesRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// DeleteInstances: Deletes the specified instances. The instances are
@@ -12654,6 +13459,14 @@
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 *InstanceGroupManagersDeleteInstancesCall) Context(ctx context.Context) *InstanceGroupManagersDeleteInstancesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersdeleteinstancesrequest)
@@ -12676,6 +13489,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12746,6 +13562,7 @@
zone string
instanceGroupManager string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified managed instance group resource.
@@ -12765,6 +13582,14 @@
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 *InstanceGroupManagersGetCall) Context(ctx context.Context) *InstanceGroupManagersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -12781,6 +13606,9 @@
"instanceGroupManager": c.instanceGroupManager,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12849,6 +13677,7 @@
zone string
instancegroupmanager *InstanceGroupManager
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a managed instance group resource in the specified
@@ -12869,6 +13698,14 @@
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 *InstanceGroupManagersInsertCall) Context(ctx context.Context) *InstanceGroupManagersInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager)
@@ -12890,6 +13727,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12952,6 +13792,7 @@
project string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of managed instance groups that are contained
@@ -13007,6 +13848,14 @@
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 *InstanceGroupManagersListCall) Context(ctx context.Context) *InstanceGroupManagersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13031,6 +13880,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13111,6 +13963,7 @@
zone string
instanceGroupManager string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ListManagedInstances: Lists managed instances.
@@ -13130,6 +13983,14 @@
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 *InstanceGroupManagersListManagedInstancesCall) Context(ctx context.Context) *InstanceGroupManagersListManagedInstancesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13146,6 +14007,9 @@
"instanceGroupManager": c.instanceGroupManager,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13215,6 +14079,7 @@
instanceGroupManager string
instancegroupmanagersrecreateinstancesrequest *InstanceGroupManagersRecreateInstancesRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// RecreateInstances: Recreates the specified instances. The instances
@@ -13237,6 +14102,14 @@
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 *InstanceGroupManagersRecreateInstancesCall) Context(ctx context.Context) *InstanceGroupManagersRecreateInstancesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersrecreateinstancesrequest)
@@ -13259,6 +14132,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13330,6 +14206,7 @@
instanceGroupManager string
size int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Resize: Resizes the managed instance group. If you increase the size,
@@ -13353,6 +14230,14 @@
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 *InstanceGroupManagersResizeCall) Context(ctx context.Context) *InstanceGroupManagersResizeCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13370,6 +14255,9 @@
"instanceGroupManager": c.instanceGroupManager,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13446,6 +14334,7 @@
instanceGroupManager string
instancegroupmanagerssetinstancetemplaterequest *InstanceGroupManagersSetInstanceTemplateRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetInstanceTemplate: Specifies the instance template to use when
@@ -13468,6 +14357,14 @@
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 *InstanceGroupManagersSetInstanceTemplateCall) Context(ctx context.Context) *InstanceGroupManagersSetInstanceTemplateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerssetinstancetemplaterequest)
@@ -13490,6 +14387,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13561,6 +14461,7 @@
instanceGroupManager string
instancegroupmanagerssettargetpoolsrequest *InstanceGroupManagersSetTargetPoolsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetTargetPools: Modifies the target pools to which all new instances
@@ -13583,6 +14484,14 @@
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 *InstanceGroupManagersSetTargetPoolsCall) Context(ctx context.Context) *InstanceGroupManagersSetTargetPoolsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerssettargetpoolsrequest)
@@ -13605,6 +14514,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13676,6 +14588,7 @@
instanceGroup string
instancegroupsaddinstancesrequest *InstanceGroupsAddInstancesRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AddInstances: Adds a list of instances to an instance group. All of
@@ -13697,6 +14610,14 @@
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 *InstanceGroupsAddInstancesCall) Context(ctx context.Context) *InstanceGroupsAddInstancesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupsAddInstancesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupsaddinstancesrequest)
@@ -13719,6 +14640,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13787,6 +14711,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AggregatedList: Retrieves the list of instance groups, and sorts them
@@ -13841,6 +14766,14 @@
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 *InstanceGroupsAggregatedListCall) Context(ctx context.Context) *InstanceGroupsAggregatedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13864,6 +14797,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13937,6 +14873,7 @@
zone string
instanceGroup string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified instance group.
@@ -13956,6 +14893,14 @@
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 *InstanceGroupsDeleteCall) Context(ctx context.Context) *InstanceGroupsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13972,6 +14917,9 @@
"instanceGroup": c.instanceGroup,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14039,6 +14987,7 @@
zone string
instanceGroup string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified instance group resource.
@@ -14058,6 +15007,14 @@
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 *InstanceGroupsGetCall) Context(ctx context.Context) *InstanceGroupsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -14074,6 +15031,9 @@
"instanceGroup": c.instanceGroup,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14142,6 +15102,7 @@
zone string
instancegroup *InstanceGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates an instance group in the specified project using the
@@ -14162,6 +15123,14 @@
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 *InstanceGroupsInsertCall) Context(ctx context.Context) *InstanceGroupsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroup)
@@ -14183,6 +15152,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14245,6 +15217,7 @@
project string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of instance groups that are located in the
@@ -14300,6 +15273,14 @@
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 *InstanceGroupsListCall) Context(ctx context.Context) *InstanceGroupsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -14324,6 +15305,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14405,6 +15389,7 @@
instanceGroup string
instancegroupslistinstancesrequest *InstanceGroupsListInstancesRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ListInstances: Lists instances in an instance group. The parameters
@@ -14463,6 +15448,14 @@
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 *InstanceGroupsListInstancesCall) Context(ctx context.Context) *InstanceGroupsListInstancesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupslistinstancesrequest)
@@ -14494,6 +15487,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14585,6 +15581,7 @@
instanceGroup string
instancegroupsremoveinstancesrequest *InstanceGroupsRemoveInstancesRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// RemoveInstances: Removes a list of instances from an instance group.
@@ -14605,6 +15602,14 @@
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 *InstanceGroupsRemoveInstancesCall) Context(ctx context.Context) *InstanceGroupsRemoveInstancesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupsRemoveInstancesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupsremoveinstancesrequest)
@@ -14627,6 +15632,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14698,6 +15706,7 @@
instanceGroup string
instancegroupssetnamedportsrequest *InstanceGroupsSetNamedPortsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetNamedPorts: Sets the named ports in an instance group.
@@ -14718,6 +15727,14 @@
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 *InstanceGroupsSetNamedPortsCall) Context(ctx context.Context) *InstanceGroupsSetNamedPortsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupssetnamedportsrequest)
@@ -14740,6 +15757,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14809,6 +15829,7 @@
project string
instanceTemplate string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified instance template.
@@ -14828,6 +15849,14 @@
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 *InstanceTemplatesDeleteCall) Context(ctx context.Context) *InstanceTemplatesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -14843,6 +15872,9 @@
"instanceTemplate": c.instanceTemplate,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14903,6 +15935,7 @@
project string
instanceTemplate string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified instance template resource.
@@ -14922,6 +15955,14 @@
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 *InstanceTemplatesGetCall) Context(ctx context.Context) *InstanceTemplatesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -14937,6 +15978,9 @@
"instanceTemplate": c.instanceTemplate,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14998,6 +16042,7 @@
project string
instancetemplate *InstanceTemplate
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates an instance template in the specified project using
@@ -15018,6 +16063,14 @@
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 *InstanceTemplatesInsertCall) Context(ctx context.Context) *InstanceTemplatesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceTemplatesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancetemplate)
@@ -15038,6 +16091,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15092,6 +16148,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of instance templates that are contained
@@ -15147,6 +16204,14 @@
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 *InstanceTemplatesListCall) Context(ctx context.Context) *InstanceTemplatesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceTemplatesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -15170,6 +16235,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15245,6 +16313,7 @@
networkInterface string
accessconfig *AccessConfig
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AddAccessConfig: Adds an access config to an instance's network
@@ -15268,6 +16337,14 @@
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 *InstancesAddAccessConfigCall) Context(ctx context.Context) *InstancesAddAccessConfigCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesAddAccessConfigCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.accessconfig)
@@ -15291,6 +16368,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15368,6 +16448,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AggregatedList:
@@ -15422,6 +16503,14 @@
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 *InstancesAggregatedListCall) Context(ctx context.Context) *InstancesAggregatedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -15445,6 +16534,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15518,6 +16610,7 @@
instance string
attacheddisk *AttachedDisk
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AttachDisk: Attaches a Disk resource to an instance.
@@ -15539,6 +16632,14 @@
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 *InstancesAttachDiskCall) Context(ctx context.Context) *InstancesAttachDiskCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesAttachDiskCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.attacheddisk)
@@ -15561,6 +16662,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15633,6 +16737,7 @@
zone string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified Instance resource. For more
@@ -15654,6 +16759,14 @@
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 *InstancesDeleteCall) Context(ctx context.Context) *InstancesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -15670,6 +16783,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15741,6 +16857,7 @@
accessConfig string
networkInterface string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// DeleteAccessConfig: Deletes an access config from an instance's
@@ -15764,6 +16881,14 @@
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 *InstancesDeleteAccessConfigCall) Context(ctx context.Context) *InstancesDeleteAccessConfigCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesDeleteAccessConfigCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -15782,6 +16907,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15866,6 +16994,7 @@
instance string
deviceName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// DetachDisk: Detaches a disk from an instance.
@@ -15887,6 +17016,14 @@
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 *InstancesDetachDiskCall) Context(ctx context.Context) *InstancesDetachDiskCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesDetachDiskCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -15904,6 +17041,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15981,6 +17121,7 @@
zone string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified instance resource.
@@ -16001,6 +17142,14 @@
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 *InstancesGetCall) Context(ctx context.Context) *InstancesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -16017,6 +17166,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16087,6 +17239,7 @@
zone string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetSerialPortOutput: Returns the specified instance's serial port
@@ -16115,6 +17268,14 @@
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 *InstancesGetSerialPortOutputCall) Context(ctx context.Context) *InstancesGetSerialPortOutputCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesGetSerialPortOutputCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -16134,6 +17295,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16213,6 +17377,7 @@
zone string
instance *Instance
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates an instance resource in the specified project using
@@ -16234,6 +17399,14 @@
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 *InstancesInsertCall) Context(ctx context.Context) *InstancesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance)
@@ -16255,6 +17428,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16318,6 +17494,7 @@
project string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of instance resources contained within the
@@ -16374,6 +17551,14 @@
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 *InstancesListCall) Context(ctx context.Context) *InstancesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -16398,6 +17583,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16479,6 +17667,7 @@
zone string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Reset: Performs a hard reset on the instance.
@@ -16499,6 +17688,14 @@
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 *InstancesResetCall) Context(ctx context.Context) *InstancesResetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesResetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -16515,6 +17712,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16586,6 +17786,7 @@
autoDelete bool
deviceName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetDiskAutoDelete: Sets the auto-delete flag for a disk attached to
@@ -16609,6 +17810,14 @@
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 *InstancesSetDiskAutoDeleteCall) Context(ctx context.Context) *InstancesSetDiskAutoDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesSetDiskAutoDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -16627,6 +17836,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16712,6 +17924,7 @@
instance string
metadata *Metadata
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetMetadata: Sets metadata for the specified instance to the data
@@ -16734,6 +17947,14 @@
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 *InstancesSetMetadataCall) Context(ctx context.Context) *InstancesSetMetadataCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesSetMetadataCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.metadata)
@@ -16756,6 +17977,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16829,6 +18053,7 @@
instance string
scheduling *Scheduling
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetScheduling: Sets an instance's scheduling options.
@@ -16850,6 +18075,14 @@
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 *InstancesSetSchedulingCall) Context(ctx context.Context) *InstancesSetSchedulingCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesSetSchedulingCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.scheduling)
@@ -16872,6 +18105,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16945,6 +18181,7 @@
instance string
tags *Tags
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetTags: Sets tags for the specified instance to the data included in
@@ -16967,6 +18204,14 @@
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 *InstancesSetTagsCall) Context(ctx context.Context) *InstancesSetTagsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesSetTagsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.tags)
@@ -16989,6 +18234,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17061,6 +18309,7 @@
zone string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Start: This method starts an instance that was stopped using the
@@ -17083,6 +18332,14 @@
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 *InstancesStartCall) Context(ctx context.Context) *InstancesStartCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesStartCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -17099,6 +18356,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17168,6 +18428,7 @@
zone string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Stop: This method stops a running instance, shutting it down cleanly,
@@ -17194,6 +18455,14 @@
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 *InstancesStopCall) Context(ctx context.Context) *InstancesStopCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesStopCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -17210,6 +18479,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17278,6 +18550,7 @@
project string
license string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified license resource.
@@ -17297,6 +18570,14 @@
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 *LicensesGetCall) Context(ctx context.Context) *LicensesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LicensesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -17312,6 +18593,9 @@
"license": c.license,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17372,6 +18656,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AggregatedList: Retrieves the list of machine type resources grouped
@@ -17427,6 +18712,14 @@
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 *MachineTypesAggregatedListCall) Context(ctx context.Context) *MachineTypesAggregatedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MachineTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -17450,6 +18743,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17523,6 +18819,7 @@
zone string
machineType string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified machine type resource.
@@ -17543,6 +18840,14 @@
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 *MachineTypesGetCall) Context(ctx context.Context) *MachineTypesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MachineTypesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -17559,6 +18864,9 @@
"machineType": c.machineType,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17628,6 +18936,7 @@
project string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of machine type resources available to the
@@ -17684,6 +18993,14 @@
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 *MachineTypesListCall) Context(ctx context.Context) *MachineTypesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MachineTypesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -17708,6 +19025,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17788,6 +19108,7 @@
project string
network string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified network resource.
@@ -17807,6 +19128,14 @@
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 *NetworksDeleteCall) Context(ctx context.Context) *NetworksDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *NetworksDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -17822,6 +19151,9 @@
"network": c.network,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17882,6 +19214,7 @@
project string
network string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified network resource.
@@ -17901,6 +19234,14 @@
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 *NetworksGetCall) Context(ctx context.Context) *NetworksGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *NetworksGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -17916,6 +19257,9 @@
"network": c.network,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17977,6 +19321,7 @@
project string
network *Network
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a network resource in the specified project using the
@@ -17997,6 +19342,14 @@
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 *NetworksInsertCall) Context(ctx context.Context) *NetworksInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *NetworksInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.network)
@@ -18017,6 +19370,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18071,6 +19427,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of network resources available to the
@@ -18126,6 +19483,14 @@
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 *NetworksListCall) Context(ctx context.Context) *NetworksListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *NetworksListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -18149,6 +19514,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18220,6 +19588,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified project resource.
@@ -18238,6 +19607,14 @@
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 *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -18252,6 +19629,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18305,6 +19685,7 @@
project string
diskmoverequest *DiskMoveRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// MoveDisk: Moves a persistent disk from one zone to another.
@@ -18323,6 +19704,14 @@
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 *ProjectsMoveDiskCall) Context(ctx context.Context) *ProjectsMoveDiskCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsMoveDiskCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.diskmoverequest)
@@ -18343,6 +19732,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18398,6 +19790,7 @@
project string
instancemoverequest *InstanceMoveRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// MoveInstance: Moves an instance and its attached persistent disks
@@ -18417,6 +19810,14 @@
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 *ProjectsMoveInstanceCall) Context(ctx context.Context) *ProjectsMoveInstanceCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsMoveInstanceCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancemoverequest)
@@ -18437,6 +19838,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18492,6 +19896,7 @@
project string
metadata *Metadata
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetCommonInstanceMetadata: Sets metadata common to all instances
@@ -18512,6 +19917,14 @@
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 *ProjectsSetCommonInstanceMetadataCall) Context(ctx context.Context) *ProjectsSetCommonInstanceMetadataCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSetCommonInstanceMetadataCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.metadata)
@@ -18532,6 +19945,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18587,6 +20003,7 @@
project string
usageexportlocation *UsageExportLocation
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetUsageExportBucket: Enables the usage export feature and sets the
@@ -18609,6 +20026,14 @@
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 *ProjectsSetUsageExportBucketCall) Context(ctx context.Context) *ProjectsSetUsageExportBucketCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSetUsageExportBucketCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.usageexportlocation)
@@ -18629,6 +20054,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18688,6 +20116,7 @@
region string
operation string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified region-specific Operations resource.
@@ -18708,6 +20137,14 @@
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 *RegionOperationsDeleteCall) Context(ctx context.Context) *RegionOperationsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RegionOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -18724,6 +20161,9 @@
"operation": c.operation,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18786,6 +20226,7 @@
region string
operation string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves the specified region-specific Operations resource.
@@ -18806,6 +20247,14 @@
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 *RegionOperationsGetCall) Context(ctx context.Context) *RegionOperationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RegionOperationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -18822,6 +20271,9 @@
"operation": c.operation,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18891,6 +20343,7 @@
project string
region string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of Operation resources contained within the
@@ -18947,6 +20400,14 @@
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 *RegionOperationsListCall) Context(ctx context.Context) *RegionOperationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RegionOperationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -18971,6 +20432,9 @@
"region": c.region,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19051,6 +20515,7 @@
project string
region string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified region resource.
@@ -19070,6 +20535,14 @@
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 *RegionsGetCall) Context(ctx context.Context) *RegionsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RegionsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -19085,6 +20558,9 @@
"region": c.region,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19145,6 +20621,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of region resources available to the
@@ -19200,6 +20677,14 @@
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 *RegionsListCall) Context(ctx context.Context) *RegionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -19223,6 +20708,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19295,6 +20783,7 @@
project string
route string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified route resource.
@@ -19314,6 +20803,14 @@
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 *RoutesDeleteCall) Context(ctx context.Context) *RoutesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RoutesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -19329,6 +20826,9 @@
"route": c.route,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19389,6 +20889,7 @@
project string
route string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified route resource.
@@ -19408,6 +20909,14 @@
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 *RoutesGetCall) Context(ctx context.Context) *RoutesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RoutesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -19423,6 +20932,9 @@
"route": c.route,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19484,6 +20996,7 @@
project string
route *Route
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a route resource in the specified project using the
@@ -19504,6 +21017,14 @@
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 *RoutesInsertCall) Context(ctx context.Context) *RoutesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RoutesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.route)
@@ -19524,6 +21045,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19578,6 +21102,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of route resources available to the
@@ -19633,6 +21158,14 @@
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 *RoutesListCall) Context(ctx context.Context) *RoutesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RoutesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -19656,6 +21189,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19728,6 +21264,7 @@
project string
snapshot string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified Snapshot resource. Keep in mind that
@@ -19753,6 +21290,14 @@
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 *SnapshotsDeleteCall) Context(ctx context.Context) *SnapshotsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -19768,6 +21313,9 @@
"snapshot": c.snapshot,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19828,6 +21376,7 @@
project string
snapshot string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified Snapshot resource.
@@ -19847,6 +21396,14 @@
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 *SnapshotsGetCall) Context(ctx context.Context) *SnapshotsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SnapshotsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -19862,6 +21419,9 @@
"snapshot": c.snapshot,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19922,6 +21482,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of Snapshot resources contained within the
@@ -19977,6 +21538,14 @@
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 *SnapshotsListCall) Context(ctx context.Context) *SnapshotsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SnapshotsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -20000,6 +21569,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20072,6 +21644,7 @@
project string
targetHttpProxy string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified TargetHttpProxy resource.
@@ -20091,6 +21664,14 @@
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 *TargetHttpProxiesDeleteCall) Context(ctx context.Context) *TargetHttpProxiesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetHttpProxiesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -20106,6 +21687,9 @@
"targetHttpProxy": c.targetHttpProxy,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20166,6 +21750,7 @@
project string
targetHttpProxy string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified TargetHttpProxy resource.
@@ -20185,6 +21770,14 @@
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 *TargetHttpProxiesGetCall) Context(ctx context.Context) *TargetHttpProxiesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetHttpProxiesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -20200,6 +21793,9 @@
"targetHttpProxy": c.targetHttpProxy,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20261,6 +21857,7 @@
project string
targethttpproxy *TargetHttpProxy
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a TargetHttpProxy resource in the specified project
@@ -20281,6 +21878,14 @@
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 *TargetHttpProxiesInsertCall) Context(ctx context.Context) *TargetHttpProxiesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetHttpProxiesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targethttpproxy)
@@ -20301,6 +21906,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20355,6 +21963,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of TargetHttpProxy resources available to
@@ -20410,6 +22019,14 @@
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 *TargetHttpProxiesListCall) Context(ctx context.Context) *TargetHttpProxiesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetHttpProxiesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -20433,6 +22050,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20506,6 +22126,7 @@
targetHttpProxy string
urlmapreference *UrlMapReference
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetUrlMap: Changes the URL map for TargetHttpProxy.
@@ -20526,6 +22147,14 @@
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 *TargetHttpProxiesSetUrlMapCall) Context(ctx context.Context) *TargetHttpProxiesSetUrlMapCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetHttpProxiesSetUrlMapCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapreference)
@@ -20547,6 +22176,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20609,6 +22241,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AggregatedList: Retrieves the list of target instances grouped by
@@ -20664,6 +22297,14 @@
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 *TargetInstancesAggregatedListCall) Context(ctx context.Context) *TargetInstancesAggregatedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetInstancesAggregatedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -20687,6 +22328,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20760,6 +22404,7 @@
zone string
targetInstance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified TargetInstance resource.
@@ -20780,6 +22425,14 @@
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 *TargetInstancesDeleteCall) Context(ctx context.Context) *TargetInstancesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetInstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -20796,6 +22449,9 @@
"targetInstance": c.targetInstance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20865,6 +22521,7 @@
zone string
targetInstance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified TargetInstance resource.
@@ -20885,6 +22542,14 @@
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 *TargetInstancesGetCall) Context(ctx context.Context) *TargetInstancesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetInstancesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -20901,6 +22566,9 @@
"targetInstance": c.targetInstance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20971,6 +22639,7 @@
zone string
targetinstance *TargetInstance
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a TargetInstance resource in the specified project
@@ -20992,6 +22661,14 @@
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 *TargetInstancesInsertCall) Context(ctx context.Context) *TargetInstancesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetInstancesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetinstance)
@@ -21013,6 +22690,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21076,6 +22756,7 @@
project string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of TargetInstance resources available to the
@@ -21132,6 +22813,14 @@
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 *TargetInstancesListCall) Context(ctx context.Context) *TargetInstancesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetInstancesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -21156,6 +22845,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21238,6 +22930,7 @@
targetPool string
targetpoolsaddhealthcheckrequest *TargetPoolsAddHealthCheckRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AddHealthCheck: Adds health check URL to targetPool.
@@ -21259,6 +22952,14 @@
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 *TargetPoolsAddHealthCheckCall) Context(ctx context.Context) *TargetPoolsAddHealthCheckCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetPoolsAddHealthCheckCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsaddhealthcheckrequest)
@@ -21281,6 +22982,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21353,6 +23057,7 @@
targetPool string
targetpoolsaddinstancerequest *TargetPoolsAddInstanceRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AddInstance: Adds instance url to targetPool.
@@ -21374,6 +23079,14 @@
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 *TargetPoolsAddInstanceCall) Context(ctx context.Context) *TargetPoolsAddInstanceCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetPoolsAddInstanceCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsaddinstancerequest)
@@ -21396,6 +23109,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21465,6 +23181,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AggregatedList: Retrieves the list of target pools grouped by scope.
@@ -21519,6 +23236,14 @@
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 *TargetPoolsAggregatedListCall) Context(ctx context.Context) *TargetPoolsAggregatedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetPoolsAggregatedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -21542,6 +23267,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21615,6 +23343,7 @@
region string
targetPool string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified TargetPool resource.
@@ -21635,6 +23364,14 @@
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 *TargetPoolsDeleteCall) Context(ctx context.Context) *TargetPoolsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetPoolsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -21651,6 +23388,9 @@
"targetPool": c.targetPool,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21720,6 +23460,7 @@
region string
targetPool string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified TargetPool resource.
@@ -21740,6 +23481,14 @@
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 *TargetPoolsGetCall) Context(ctx context.Context) *TargetPoolsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetPoolsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -21756,6 +23505,9 @@
"targetPool": c.targetPool,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21827,6 +23579,7 @@
targetPool string
instancereference *InstanceReference
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetHealth: Gets the most recent health check results for each IP for
@@ -21849,6 +23602,14 @@
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 *TargetPoolsGetHealthCall) Context(ctx context.Context) *TargetPoolsGetHealthCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetPoolsGetHealthCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancereference)
@@ -21871,6 +23632,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21943,6 +23707,7 @@
region string
targetpool *TargetPool
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a TargetPool resource in the specified project and
@@ -21964,6 +23729,14 @@
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 *TargetPoolsInsertCall) Context(ctx context.Context) *TargetPoolsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetPoolsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpool)
@@ -21985,6 +23758,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22048,6 +23824,7 @@
project string
region string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of TargetPool resources available to the
@@ -22104,6 +23881,14 @@
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 *TargetPoolsListCall) Context(ctx context.Context) *TargetPoolsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetPoolsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22128,6 +23913,9 @@
"region": c.region,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22210,6 +23998,7 @@
targetPool string
targetpoolsremovehealthcheckrequest *TargetPoolsRemoveHealthCheckRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// RemoveHealthCheck: Removes health check URL from targetPool.
@@ -22231,6 +24020,14 @@
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 *TargetPoolsRemoveHealthCheckCall) Context(ctx context.Context) *TargetPoolsRemoveHealthCheckCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetPoolsRemoveHealthCheckCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsremovehealthcheckrequest)
@@ -22253,6 +24050,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22325,6 +24125,7 @@
targetPool string
targetpoolsremoveinstancerequest *TargetPoolsRemoveInstanceRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// RemoveInstance: Removes instance URL from targetPool.
@@ -22346,6 +24147,14 @@
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 *TargetPoolsRemoveInstanceCall) Context(ctx context.Context) *TargetPoolsRemoveInstanceCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetPoolsRemoveInstanceCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsremoveinstancerequest)
@@ -22368,6 +24177,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22440,6 +24252,7 @@
targetPool string
targetreference *TargetReference
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetBackup: Changes backup pool configurations.
@@ -22468,6 +24281,14 @@
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 *TargetPoolsSetBackupCall) Context(ctx context.Context) *TargetPoolsSetBackupCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetPoolsSetBackupCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference)
@@ -22493,6 +24314,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22569,6 +24393,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AggregatedList: Retrieves the list of target VPN gateways grouped by
@@ -22623,6 +24448,14 @@
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 *TargetVpnGatewaysAggregatedListCall) Context(ctx context.Context) *TargetVpnGatewaysAggregatedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetVpnGatewaysAggregatedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22646,6 +24479,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22719,6 +24555,7 @@
region string
targetVpnGateway string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified TargetVpnGateway resource.
@@ -22738,6 +24575,14 @@
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 *TargetVpnGatewaysDeleteCall) Context(ctx context.Context) *TargetVpnGatewaysDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetVpnGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22754,6 +24599,9 @@
"targetVpnGateway": c.targetVpnGateway,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22823,6 +24671,7 @@
region string
targetVpnGateway string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified TargetVpnGateway resource.
@@ -22842,6 +24691,14 @@
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 *TargetVpnGatewaysGetCall) Context(ctx context.Context) *TargetVpnGatewaysGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetVpnGatewaysGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22858,6 +24715,9 @@
"targetVpnGateway": c.targetVpnGateway,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22928,6 +24788,7 @@
region string
targetvpngateway *TargetVpnGateway
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a TargetVpnGateway resource in the specified project
@@ -22948,6 +24809,14 @@
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 *TargetVpnGatewaysInsertCall) Context(ctx context.Context) *TargetVpnGatewaysInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetVpnGatewaysInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetvpngateway)
@@ -22969,6 +24838,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23032,6 +24904,7 @@
project string
region string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of TargetVpnGateway resources available to
@@ -23087,6 +24960,14 @@
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 *TargetVpnGatewaysListCall) Context(ctx context.Context) *TargetVpnGatewaysListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetVpnGatewaysListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -23111,6 +24992,9 @@
"region": c.region,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23191,6 +25075,7 @@
project string
urlMap string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified UrlMap resource.
@@ -23210,6 +25095,14 @@
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 *UrlMapsDeleteCall) Context(ctx context.Context) *UrlMapsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UrlMapsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -23225,6 +25118,9 @@
"urlMap": c.urlMap,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23285,6 +25181,7 @@
project string
urlMap string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified UrlMap resource.
@@ -23304,6 +25201,14 @@
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 *UrlMapsGetCall) Context(ctx context.Context) *UrlMapsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UrlMapsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -23319,6 +25224,9 @@
"urlMap": c.urlMap,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23380,6 +25288,7 @@
project string
urlmap *UrlMap
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a UrlMap resource in the specified project using the
@@ -23400,6 +25309,14 @@
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 *UrlMapsInsertCall) Context(ctx context.Context) *UrlMapsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UrlMapsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap)
@@ -23420,6 +25337,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23474,6 +25394,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of UrlMap resources available to the
@@ -23529,6 +25450,14 @@
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 *UrlMapsListCall) Context(ctx context.Context) *UrlMapsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UrlMapsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -23552,6 +25481,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23625,6 +25557,7 @@
urlMap string
urlmap *UrlMap
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Update the entire content of the UrlMap resource. This method
@@ -23646,6 +25579,14 @@
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 *UrlMapsPatchCall) Context(ctx context.Context) *UrlMapsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UrlMapsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap)
@@ -23667,6 +25608,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23731,6 +25675,7 @@
urlMap string
urlmap *UrlMap
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Update the entire content of the UrlMap resource.
@@ -23751,6 +25696,14 @@
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 *UrlMapsUpdateCall) Context(ctx context.Context) *UrlMapsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UrlMapsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap)
@@ -23772,6 +25725,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23836,6 +25792,7 @@
urlMap string
urlmapsvalidaterequest *UrlMapsValidateRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Validate: Run static validation for the UrlMap. In particular, the
@@ -23858,6 +25815,14 @@
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 *UrlMapsValidateCall) Context(ctx context.Context) *UrlMapsValidateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UrlMapsValidateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapsvalidaterequest)
@@ -23879,6 +25844,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23941,6 +25909,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AggregatedList: Retrieves the list of VPN tunnels grouped by scope.
@@ -23994,6 +25963,14 @@
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 *VpnTunnelsAggregatedListCall) Context(ctx context.Context) *VpnTunnelsAggregatedListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VpnTunnelsAggregatedListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -24017,6 +25994,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24090,6 +26070,7 @@
region string
vpnTunnel string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified VpnTunnel resource.
@@ -24109,6 +26090,14 @@
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 *VpnTunnelsDeleteCall) Context(ctx context.Context) *VpnTunnelsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VpnTunnelsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -24125,6 +26114,9 @@
"vpnTunnel": c.vpnTunnel,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24194,6 +26186,7 @@
region string
vpnTunnel string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified VpnTunnel resource.
@@ -24213,6 +26206,14 @@
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 *VpnTunnelsGetCall) Context(ctx context.Context) *VpnTunnelsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VpnTunnelsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -24229,6 +26230,9 @@
"vpnTunnel": c.vpnTunnel,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24299,6 +26303,7 @@
region string
vpntunnel *VpnTunnel
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a VpnTunnel resource in the specified project and
@@ -24319,6 +26324,14 @@
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 *VpnTunnelsInsertCall) Context(ctx context.Context) *VpnTunnelsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VpnTunnelsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.vpntunnel)
@@ -24340,6 +26353,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24403,6 +26419,7 @@
project string
region string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of VpnTunnel resources contained in the
@@ -24458,6 +26475,14 @@
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 *VpnTunnelsListCall) Context(ctx context.Context) *VpnTunnelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VpnTunnelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -24482,6 +26507,9 @@
"region": c.region,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24563,6 +26591,7 @@
zone string
operation string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified zone-specific Operations resource.
@@ -24583,6 +26612,14 @@
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 *ZoneOperationsDeleteCall) Context(ctx context.Context) *ZoneOperationsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZoneOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -24599,6 +26636,9 @@
"operation": c.operation,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24661,6 +26701,7 @@
zone string
operation string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves the specified zone-specific Operations resource.
@@ -24681,6 +26722,14 @@
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 *ZoneOperationsGetCall) Context(ctx context.Context) *ZoneOperationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -24697,6 +26746,9 @@
"operation": c.operation,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24766,6 +26818,7 @@
project string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of Operation resources contained within the
@@ -24822,6 +26875,14 @@
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 *ZoneOperationsListCall) Context(ctx context.Context) *ZoneOperationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZoneOperationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -24846,6 +26907,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24926,6 +26990,7 @@
project string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified zone resource.
@@ -24945,6 +27010,14 @@
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 *ZonesGetCall) Context(ctx context.Context) *ZonesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZonesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -24960,6 +27033,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -25020,6 +27096,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of zone resources available to the specified
@@ -25075,6 +27152,14 @@
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 *ZonesListCall) Context(ctx context.Context) *ZonesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZonesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -25098,6 +27183,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/container/v1/container-gen.go b/container/v1/container-gen.go
index e1bb381..6ee93fd 100644
--- a/container/v1/container-gen.go
+++ b/container/v1/container-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "container:v1"
const apiName = "container"
@@ -375,6 +375,7 @@
projectId string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetServerconfig: Returns configuration info about the Container
@@ -394,6 +395,14 @@
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 *ProjectsZonesGetServerconfigCall) Context(ctx context.Context) *ProjectsZonesGetServerconfigCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsZonesGetServerconfigCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -409,6 +418,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -467,6 +479,7 @@
zone string
createclusterrequest *CreateClusterRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a cluster, consisting of the specified number and
@@ -494,6 +507,14 @@
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 *ProjectsZonesClustersCreateCall) Context(ctx context.Context) *ProjectsZonesClustersCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsZonesClustersCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.createclusterrequest)
@@ -515,6 +536,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -576,6 +600,7 @@
zone string
clusterId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the cluster, including the Kubernetes endpoint and
@@ -597,6 +622,14 @@
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 *ProjectsZonesClustersDeleteCall) Context(ctx context.Context) *ProjectsZonesClustersDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsZonesClustersDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -613,6 +646,9 @@
"clusterId": c.clusterId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -678,6 +714,7 @@
zone string
clusterId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a specific cluster.
@@ -697,6 +734,14 @@
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 *ProjectsZonesClustersGetCall) Context(ctx context.Context) *ProjectsZonesClustersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsZonesClustersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -713,6 +758,9 @@
"clusterId": c.clusterId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -777,6 +825,7 @@
projectId string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all clusters owned by a project in either the specified
@@ -796,6 +845,14 @@
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 *ProjectsZonesClustersListCall) Context(ctx context.Context) *ProjectsZonesClustersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsZonesClustersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -811,6 +868,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -870,6 +930,7 @@
clusterId string
updateclusterrequest *UpdateClusterRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Update settings of a specific cluster.
@@ -890,6 +951,14 @@
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 *ProjectsZonesClustersUpdateCall) Context(ctx context.Context) *ProjectsZonesClustersUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsZonesClustersUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.updateclusterrequest)
@@ -912,6 +981,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -980,6 +1052,7 @@
zone string
operationId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the specified operation.
@@ -999,6 +1072,14 @@
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 *ProjectsZonesOperationsGetCall) Context(ctx context.Context) *ProjectsZonesOperationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsZonesOperationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1015,6 +1096,9 @@
"operationId": c.operationId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1079,6 +1163,7 @@
projectId string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all operations in a project in a specific zone or all
@@ -1098,6 +1183,14 @@
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 *ProjectsZonesOperationsListCall) Context(ctx context.Context) *ProjectsZonesOperationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsZonesOperationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1113,6 +1206,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/content/v2/content-gen.go b/content/v2/content-gen.go
index 5307a59..9e0b056 100644
--- a/content/v2/content-gen.go
+++ b/content/v2/content-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "content:v2"
const apiName = "content"
@@ -2752,6 +2752,7 @@
type AccountsAuthinfoCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Authinfo: Returns information about the authenticated user.
@@ -2768,6 +2769,14 @@
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 *AccountsAuthinfoCall) Context(ctx context.Context) *AccountsAuthinfoCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsAuthinfoCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2780,6 +2789,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2818,6 +2830,7 @@
s *Service
accountscustombatchrequest *AccountsCustomBatchRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Custombatch: Retrieves, inserts, updates, and deletes multiple
@@ -2843,6 +2856,14 @@
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 *AccountsCustombatchCall) Context(ctx context.Context) *AccountsCustombatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsCustombatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountscustombatchrequest)
@@ -2864,6 +2885,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2913,6 +2937,7 @@
merchantId uint64
accountId uint64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a Merchant Center sub-account.
@@ -2938,6 +2963,14 @@
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 *AccountsDeleteCall) Context(ctx context.Context) *AccountsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2956,6 +2989,9 @@
"accountId": strconv.FormatUint(c.accountId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3013,6 +3049,7 @@
merchantId uint64
accountId uint64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a Merchant Center account.
@@ -3031,6 +3068,14 @@
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 *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3046,6 +3091,9 @@
"accountId": strconv.FormatUint(c.accountId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3105,6 +3153,7 @@
merchantId uint64
account *Account
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a Merchant Center sub-account.
@@ -3130,6 +3179,14 @@
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 *AccountsInsertCall) Context(ctx context.Context) *AccountsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
@@ -3153,6 +3210,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3211,6 +3271,7 @@
s *Service
merchantId uint64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the sub-accounts in your Merchant Center account.
@@ -3242,6 +3303,14 @@
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 *AccountsListCall) Context(ctx context.Context) *AccountsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3262,6 +3331,9 @@
"merchantId": strconv.FormatUint(c.merchantId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3325,6 +3397,7 @@
accountId uint64
account *Account
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a Merchant Center account. This method supports patch
@@ -3352,6 +3425,14 @@
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 *AccountsPatchCall) Context(ctx context.Context) *AccountsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
@@ -3376,6 +3457,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3444,6 +3528,7 @@
accountId uint64
account *Account
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a Merchant Center account.
@@ -3470,6 +3555,14 @@
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 *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
@@ -3494,6 +3587,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3560,6 +3656,7 @@
s *Service
accountshippingcustombatchrequest *AccountshippingCustomBatchRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Custombatch: Retrieves and updates the shipping settings of multiple
@@ -3585,6 +3682,14 @@
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 *AccountshippingCustombatchCall) Context(ctx context.Context) *AccountshippingCustombatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountshippingCustombatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountshippingcustombatchrequest)
@@ -3606,6 +3711,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3655,6 +3763,7 @@
merchantId uint64
accountId uint64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves the shipping settings of the account.
@@ -3673,6 +3782,14 @@
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 *AccountshippingGetCall) Context(ctx context.Context) *AccountshippingGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountshippingGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3688,6 +3805,9 @@
"accountId": strconv.FormatUint(c.accountId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3746,6 +3866,7 @@
s *Service
merchantId uint64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the shipping settings of the sub-accounts in your
@@ -3779,6 +3900,14 @@
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 *AccountshippingListCall) Context(ctx context.Context) *AccountshippingListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountshippingListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3799,6 +3928,9 @@
"merchantId": strconv.FormatUint(c.merchantId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3862,6 +3994,7 @@
accountId uint64
accountshipping *AccountShipping
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates the shipping settings of the account. This method
@@ -3889,6 +4022,14 @@
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 *AccountshippingPatchCall) Context(ctx context.Context) *AccountshippingPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountshippingPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountshipping)
@@ -3913,6 +4054,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3981,6 +4125,7 @@
accountId uint64
accountshipping *AccountShipping
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates the shipping settings of the account.
@@ -4007,6 +4152,14 @@
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 *AccountshippingUpdateCall) Context(ctx context.Context) *AccountshippingUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountshippingUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountshipping)
@@ -4031,6 +4184,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4097,6 +4253,7 @@
s *Service
accountstatusescustombatchrequest *AccountstatusesCustomBatchRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Custombatch:
@@ -4114,6 +4271,14 @@
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 *AccountstatusesCustombatchCall) Context(ctx context.Context) *AccountstatusesCustombatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountstatusescustombatchrequest)
@@ -4132,6 +4297,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4173,6 +4341,7 @@
merchantId uint64
accountId uint64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves the status of a Merchant Center account.
@@ -4191,6 +4360,14 @@
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 *AccountstatusesGetCall) Context(ctx context.Context) *AccountstatusesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountstatusesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4206,6 +4383,9 @@
"accountId": strconv.FormatUint(c.accountId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4264,6 +4444,7 @@
s *Service
merchantId uint64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the statuses of the sub-accounts in your Merchant Center
@@ -4297,6 +4478,14 @@
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 *AccountstatusesListCall) Context(ctx context.Context) *AccountstatusesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountstatusesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4317,6 +4506,9 @@
"merchantId": strconv.FormatUint(c.merchantId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4378,6 +4570,7 @@
s *Service
accounttaxcustombatchrequest *AccounttaxCustomBatchRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Custombatch: Retrieves and updates tax settings of multiple accounts
@@ -4403,6 +4596,14 @@
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 *AccounttaxCustombatchCall) Context(ctx context.Context) *AccounttaxCustombatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccounttaxCustombatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.accounttaxcustombatchrequest)
@@ -4424,6 +4625,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4473,6 +4677,7 @@
merchantId uint64
accountId uint64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves the tax settings of the account.
@@ -4491,6 +4696,14 @@
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 *AccounttaxGetCall) Context(ctx context.Context) *AccounttaxGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccounttaxGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4506,6 +4719,9 @@
"accountId": strconv.FormatUint(c.accountId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4564,6 +4780,7 @@
s *Service
merchantId uint64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the tax settings of the sub-accounts in your Merchant
@@ -4596,6 +4813,14 @@
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 *AccounttaxListCall) Context(ctx context.Context) *AccounttaxListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccounttaxListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4616,6 +4841,9 @@
"merchantId": strconv.FormatUint(c.merchantId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4679,6 +4907,7 @@
accountId uint64
accounttax *AccountTax
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates the tax settings of the account. This method supports
@@ -4706,6 +4935,14 @@
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 *AccounttaxPatchCall) Context(ctx context.Context) *AccounttaxPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccounttaxPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.accounttax)
@@ -4730,6 +4967,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4798,6 +5038,7 @@
accountId uint64
accounttax *AccountTax
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates the tax settings of the account.
@@ -4824,6 +5065,14 @@
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 *AccounttaxUpdateCall) Context(ctx context.Context) *AccounttaxUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccounttaxUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.accounttax)
@@ -4848,6 +5097,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4914,6 +5166,7 @@
s *Service
datafeedscustombatchrequest *DatafeedsCustomBatchRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Custombatch:
@@ -4938,6 +5191,14 @@
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 *DatafeedsCustombatchCall) Context(ctx context.Context) *DatafeedsCustombatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatafeedsCustombatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeedscustombatchrequest)
@@ -4959,6 +5220,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5007,6 +5271,7 @@
merchantId uint64
datafeedId uint64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a datafeed from your Merchant Center account.
@@ -5032,6 +5297,14 @@
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 *DatafeedsDeleteCall) Context(ctx context.Context) *DatafeedsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatafeedsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5050,6 +5323,9 @@
"datafeedId": strconv.FormatUint(c.datafeedId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5105,6 +5381,7 @@
merchantId uint64
datafeedId uint64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a datafeed from your Merchant Center account.
@@ -5123,6 +5400,14 @@
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 *DatafeedsGetCall) Context(ctx context.Context) *DatafeedsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatafeedsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5138,6 +5423,9 @@
"datafeedId": strconv.FormatUint(c.datafeedId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5195,6 +5483,7 @@
merchantId uint64
datafeed *Datafeed
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Registers a datafeed with your Merchant Center account.
@@ -5220,6 +5509,14 @@
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 *DatafeedsInsertCall) Context(ctx context.Context) *DatafeedsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatafeedsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeed)
@@ -5243,6 +5540,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5300,6 +5600,7 @@
s *Service
merchantId uint64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the datafeeds in your Merchant Center account.
@@ -5331,6 +5632,14 @@
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 *DatafeedsListCall) Context(ctx context.Context) *DatafeedsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatafeedsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5351,6 +5660,9 @@
"merchantId": strconv.FormatUint(c.merchantId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5414,6 +5726,7 @@
datafeedId uint64
datafeed *Datafeed
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a datafeed of your Merchant Center account. This
@@ -5441,6 +5754,14 @@
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 *DatafeedsPatchCall) Context(ctx context.Context) *DatafeedsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatafeedsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeed)
@@ -5465,6 +5786,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5531,6 +5855,7 @@
datafeedId uint64
datafeed *Datafeed
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a datafeed of your Merchant Center account.
@@ -5557,6 +5882,14 @@
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 *DatafeedsUpdateCall) Context(ctx context.Context) *DatafeedsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatafeedsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeed)
@@ -5581,6 +5914,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5645,6 +5981,7 @@
s *Service
datafeedstatusescustombatchrequest *DatafeedstatusesCustomBatchRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Custombatch:
@@ -5662,6 +5999,14 @@
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 *DatafeedstatusesCustombatchCall) Context(ctx context.Context) *DatafeedstatusesCustombatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatafeedstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeedstatusescustombatchrequest)
@@ -5680,6 +6025,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5721,6 +6069,7 @@
merchantId uint64
datafeedId uint64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves the status of a datafeed from your Merchant Center
@@ -5740,6 +6089,14 @@
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 *DatafeedstatusesGetCall) Context(ctx context.Context) *DatafeedstatusesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatafeedstatusesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5755,6 +6112,9 @@
"datafeedId": strconv.FormatUint(c.datafeedId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5811,6 +6171,7 @@
s *Service
merchantId uint64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the statuses of the datafeeds in your Merchant Center
@@ -5843,6 +6204,14 @@
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 *DatafeedstatusesListCall) Context(ctx context.Context) *DatafeedstatusesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatafeedstatusesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5863,6 +6232,9 @@
"merchantId": strconv.FormatUint(c.merchantId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5924,6 +6296,7 @@
s *Service
inventorycustombatchrequest *InventoryCustomBatchRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Custombatch: Updates price and availability for multiple products or
@@ -5950,6 +6323,14 @@
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 *InventoryCustombatchCall) Context(ctx context.Context) *InventoryCustombatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InventoryCustombatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.inventorycustombatchrequest)
@@ -5971,6 +6352,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6022,6 +6406,7 @@
productId string
inventorysetrequest *InventorySetRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Set: Updates price and availability of a product in your Merchant
@@ -6051,6 +6436,14 @@
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 *InventorySetCall) Context(ctx context.Context) *InventorySetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InventorySetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.inventorysetrequest)
@@ -6076,6 +6469,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6150,6 +6546,7 @@
orderId string
ordersacknowledgerequest *OrdersAcknowledgeRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Acknowledge: Marks an order as acknowledged.
@@ -6169,6 +6566,14 @@
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 *OrdersAcknowledgeCall) Context(ctx context.Context) *OrdersAcknowledgeCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersAcknowledgeCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersacknowledgerequest)
@@ -6190,6 +6595,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6251,6 +6659,7 @@
merchantId uint64
orderId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Advancetestorder: Sandbox only. Moves a test order from state
@@ -6270,6 +6679,14 @@
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 *OrdersAdvancetestorderCall) Context(ctx context.Context) *OrdersAdvancetestorderCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersAdvancetestorderCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6285,6 +6702,9 @@
"orderId": c.orderId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6344,6 +6764,7 @@
orderId string
orderscancelrequest *OrdersCancelRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Cancel: Cancels all line items in an order.
@@ -6363,6 +6784,14 @@
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 *OrdersCancelCall) Context(ctx context.Context) *OrdersCancelCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersCancelCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscancelrequest)
@@ -6384,6 +6813,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6446,6 +6878,7 @@
orderId string
orderscancellineitemrequest *OrdersCancelLineItemRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Cancellineitem: Cancels a line item.
@@ -6465,6 +6898,14 @@
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 *OrdersCancellineitemCall) Context(ctx context.Context) *OrdersCancellineitemCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersCancellineitemCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscancellineitemrequest)
@@ -6486,6 +6927,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6547,6 +6991,7 @@
merchantId uint64
orderscreatetestorderrequest *OrdersCreateTestOrderRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Createtestorder: Sandbox only. Creates a test order.
@@ -6565,6 +7010,14 @@
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 *OrdersCreatetestorderCall) Context(ctx context.Context) *OrdersCreatetestorderCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersCreatetestorderCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscreatetestorderrequest)
@@ -6585,6 +7038,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6638,6 +7094,7 @@
s *Service
orderscustombatchrequest *OrdersCustomBatchRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Custombatch: Retrieves or modifies multiple orders in a single
@@ -6656,6 +7113,14 @@
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 *OrdersCustombatchCall) Context(ctx context.Context) *OrdersCustombatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersCustombatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscustombatchrequest)
@@ -6674,6 +7139,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6716,6 +7184,7 @@
merchantId uint64
orderId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves an order from your Merchant Center account.
@@ -6734,6 +7203,14 @@
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 *OrdersGetCall) Context(ctx context.Context) *OrdersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6749,6 +7226,9 @@
"orderId": c.orderId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6807,6 +7287,7 @@
merchantId uint64
merchantOrderId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Getbymerchantorderid: Retrieves an order using merchant order id.
@@ -6825,6 +7306,14 @@
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 *OrdersGetbymerchantorderidCall) Context(ctx context.Context) *OrdersGetbymerchantorderidCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersGetbymerchantorderidCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6840,6 +7329,9 @@
"merchantOrderId": c.merchantOrderId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6898,6 +7390,7 @@
merchantId uint64
templateName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Gettestordertemplate: Sandbox only. Retrieves an order template that
@@ -6917,6 +7410,14 @@
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 *OrdersGettestordertemplateCall) Context(ctx context.Context) *OrdersGettestordertemplateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersGettestordertemplateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6932,6 +7433,9 @@
"templateName": c.templateName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6997,6 +7501,7 @@
s *Service
merchantId uint64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the orders in your Merchant Center account.
@@ -7098,6 +7603,14 @@
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 *OrdersListCall) Context(ctx context.Context) *OrdersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7133,6 +7646,9 @@
"merchantId": strconv.FormatUint(c.merchantId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7256,6 +7772,7 @@
orderId string
ordersrefundrequest *OrdersRefundRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Refund: Refund a portion of the order, up to the full amount paid.
@@ -7275,6 +7792,14 @@
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 *OrdersRefundCall) Context(ctx context.Context) *OrdersRefundCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersRefundCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersrefundrequest)
@@ -7296,6 +7821,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7358,6 +7886,7 @@
orderId string
ordersreturnlineitemrequest *OrdersReturnLineItemRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Returnlineitem: Returns a line item.
@@ -7377,6 +7906,14 @@
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 *OrdersReturnlineitemCall) Context(ctx context.Context) *OrdersReturnlineitemCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersReturnlineitemCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersreturnlineitemrequest)
@@ -7398,6 +7935,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7460,6 +8000,7 @@
orderId string
ordersshiplineitemsrequest *OrdersShipLineItemsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Shiplineitems: Marks line item(s) as shipped.
@@ -7479,6 +8020,14 @@
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 *OrdersShiplineitemsCall) Context(ctx context.Context) *OrdersShiplineitemsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersShiplineitemsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersshiplineitemsrequest)
@@ -7500,6 +8049,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7562,6 +8114,7 @@
orderId string
ordersupdatemerchantorderidrequest *OrdersUpdateMerchantOrderIdRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Updatemerchantorderid: Updates the merchant order ID for a given
@@ -7582,6 +8135,14 @@
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 *OrdersUpdatemerchantorderidCall) Context(ctx context.Context) *OrdersUpdatemerchantorderidCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersUpdatemerchantorderidCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdatemerchantorderidrequest)
@@ -7603,6 +8164,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7665,6 +8229,7 @@
orderId string
ordersupdateshipmentrequest *OrdersUpdateShipmentRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Updateshipment: Updates a shipment's status, carrier, and/or tracking
@@ -7685,6 +8250,14 @@
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 *OrdersUpdateshipmentCall) Context(ctx context.Context) *OrdersUpdateshipmentCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersUpdateshipmentCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdateshipmentrequest)
@@ -7706,6 +8279,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7766,6 +8342,7 @@
s *Service
productscustombatchrequest *ProductsCustomBatchRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Custombatch: Retrieves, inserts, and deletes multiple products in a
@@ -7791,6 +8368,14 @@
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 *ProductsCustombatchCall) Context(ctx context.Context) *ProductsCustombatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProductsCustombatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.productscustombatchrequest)
@@ -7812,6 +8397,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7861,6 +8449,7 @@
merchantId uint64
productId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a product from your Merchant Center account.
@@ -7886,6 +8475,14 @@
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 *ProductsDeleteCall) Context(ctx context.Context) *ProductsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProductsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7904,6 +8501,9 @@
"productId": c.productId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7960,6 +8560,7 @@
merchantId uint64
productId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a product from your Merchant Center account.
@@ -7978,6 +8579,14 @@
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 *ProductsGetCall) Context(ctx context.Context) *ProductsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProductsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7993,6 +8602,9 @@
"productId": c.productId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8051,6 +8663,7 @@
merchantId uint64
product *Product
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Uploads a product to your Merchant Center account.
@@ -8076,6 +8689,14 @@
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 *ProductsInsertCall) Context(ctx context.Context) *ProductsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProductsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.product)
@@ -8099,6 +8720,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8157,6 +8781,7 @@
s *Service
merchantId uint64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the products in your Merchant Center account.
@@ -8188,6 +8813,14 @@
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 *ProductsListCall) Context(ctx context.Context) *ProductsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProductsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8208,6 +8841,9 @@
"merchantId": strconv.FormatUint(c.merchantId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8269,6 +8905,7 @@
s *Service
productstatusescustombatchrequest *ProductstatusesCustomBatchRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Custombatch: Gets the statuses of multiple products in a single
@@ -8287,6 +8924,14 @@
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 *ProductstatusesCustombatchCall) Context(ctx context.Context) *ProductstatusesCustombatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProductstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.productstatusescustombatchrequest)
@@ -8305,6 +8950,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8347,6 +8995,7 @@
merchantId uint64
productId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the status of a product from your Merchant Center account.
@@ -8365,6 +9014,14 @@
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 *ProductstatusesGetCall) Context(ctx context.Context) *ProductstatusesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProductstatusesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8380,6 +9037,9 @@
"productId": c.productId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8437,6 +9097,7 @@
s *Service
merchantId uint64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the statuses of the products in your Merchant Center
@@ -8470,6 +9131,14 @@
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 *ProductstatusesListCall) Context(ctx context.Context) *ProductstatusesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProductstatusesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8490,6 +9159,9 @@
"merchantId": strconv.FormatUint(c.merchantId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/content/v2sandbox/content-gen.go b/content/v2sandbox/content-gen.go
index 37f22e9..5a1c918 100644
--- a/content/v2sandbox/content-gen.go
+++ b/content/v2sandbox/content-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "content:v2sandbox"
const apiName = "content"
@@ -1004,6 +1004,7 @@
orderId string
ordersacknowledgerequest *OrdersAcknowledgeRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Acknowledge: Marks an order as acknowledged.
@@ -1023,6 +1024,14 @@
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 *OrdersAcknowledgeCall) Context(ctx context.Context) *OrdersAcknowledgeCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersAcknowledgeCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersacknowledgerequest)
@@ -1044,6 +1053,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1105,6 +1117,7 @@
merchantId uint64
orderId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Advancetestorder: Sandbox only. Moves a test order from state
@@ -1124,6 +1137,14 @@
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 *OrdersAdvancetestorderCall) Context(ctx context.Context) *OrdersAdvancetestorderCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersAdvancetestorderCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1139,6 +1160,9 @@
"orderId": c.orderId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1198,6 +1222,7 @@
orderId string
orderscancelrequest *OrdersCancelRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Cancel: Cancels all line items in an order.
@@ -1217,6 +1242,14 @@
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 *OrdersCancelCall) Context(ctx context.Context) *OrdersCancelCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersCancelCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscancelrequest)
@@ -1238,6 +1271,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1300,6 +1336,7 @@
orderId string
orderscancellineitemrequest *OrdersCancelLineItemRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Cancellineitem: Cancels a line item.
@@ -1319,6 +1356,14 @@
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 *OrdersCancellineitemCall) Context(ctx context.Context) *OrdersCancellineitemCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersCancellineitemCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscancellineitemrequest)
@@ -1340,6 +1385,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1401,6 +1449,7 @@
merchantId uint64
orderscreatetestorderrequest *OrdersCreateTestOrderRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Createtestorder: Sandbox only. Creates a test order.
@@ -1419,6 +1468,14 @@
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 *OrdersCreatetestorderCall) Context(ctx context.Context) *OrdersCreatetestorderCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersCreatetestorderCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscreatetestorderrequest)
@@ -1439,6 +1496,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1492,6 +1552,7 @@
s *Service
orderscustombatchrequest *OrdersCustomBatchRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Custombatch: Retrieves or modifies multiple orders in a single
@@ -1510,6 +1571,14 @@
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 *OrdersCustombatchCall) Context(ctx context.Context) *OrdersCustombatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersCustombatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscustombatchrequest)
@@ -1528,6 +1597,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1570,6 +1642,7 @@
merchantId uint64
orderId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves an order from your Merchant Center account.
@@ -1588,6 +1661,14 @@
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 *OrdersGetCall) Context(ctx context.Context) *OrdersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1603,6 +1684,9 @@
"orderId": c.orderId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1661,6 +1745,7 @@
merchantId uint64
merchantOrderId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Getbymerchantorderid: Retrieves an order using merchant order id.
@@ -1679,6 +1764,14 @@
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 *OrdersGetbymerchantorderidCall) Context(ctx context.Context) *OrdersGetbymerchantorderidCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersGetbymerchantorderidCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1694,6 +1787,9 @@
"merchantOrderId": c.merchantOrderId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1752,6 +1848,7 @@
merchantId uint64
templateName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Gettestordertemplate: Sandbox only. Retrieves an order template that
@@ -1771,6 +1868,14 @@
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 *OrdersGettestordertemplateCall) Context(ctx context.Context) *OrdersGettestordertemplateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersGettestordertemplateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1786,6 +1891,9 @@
"templateName": c.templateName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1851,6 +1959,7 @@
s *Service
merchantId uint64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the orders in your Merchant Center account.
@@ -1952,6 +2061,14 @@
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 *OrdersListCall) Context(ctx context.Context) *OrdersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1987,6 +2104,9 @@
"merchantId": strconv.FormatUint(c.merchantId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2110,6 +2230,7 @@
orderId string
ordersrefundrequest *OrdersRefundRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Refund: Refund a portion of the order, up to the full amount paid.
@@ -2129,6 +2250,14 @@
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 *OrdersRefundCall) Context(ctx context.Context) *OrdersRefundCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersRefundCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersrefundrequest)
@@ -2150,6 +2279,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2212,6 +2344,7 @@
orderId string
ordersreturnlineitemrequest *OrdersReturnLineItemRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Returnlineitem: Returns a line item.
@@ -2231,6 +2364,14 @@
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 *OrdersReturnlineitemCall) Context(ctx context.Context) *OrdersReturnlineitemCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersReturnlineitemCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersreturnlineitemrequest)
@@ -2252,6 +2393,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2314,6 +2458,7 @@
orderId string
ordersshiplineitemsrequest *OrdersShipLineItemsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Shiplineitems: Marks line item(s) as shipped.
@@ -2333,6 +2478,14 @@
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 *OrdersShiplineitemsCall) Context(ctx context.Context) *OrdersShiplineitemsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersShiplineitemsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersshiplineitemsrequest)
@@ -2354,6 +2507,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2416,6 +2572,7 @@
orderId string
ordersupdatemerchantorderidrequest *OrdersUpdateMerchantOrderIdRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Updatemerchantorderid: Updates the merchant order ID for a given
@@ -2436,6 +2593,14 @@
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 *OrdersUpdatemerchantorderidCall) Context(ctx context.Context) *OrdersUpdatemerchantorderidCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersUpdatemerchantorderidCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdatemerchantorderidrequest)
@@ -2457,6 +2622,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2519,6 +2687,7 @@
orderId string
ordersupdateshipmentrequest *OrdersUpdateShipmentRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Updateshipment: Updates a shipment's status, carrier, and/or tracking
@@ -2539,6 +2708,14 @@
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 *OrdersUpdateshipmentCall) Context(ctx context.Context) *OrdersUpdateshipmentCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersUpdateshipmentCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdateshipmentrequest)
@@ -2560,6 +2737,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/coordinate/v1/coordinate-gen.go b/coordinate/v1/coordinate-gen.go
index c8bcc6e..33c96e6 100644
--- a/coordinate/v1/coordinate-gen.go
+++ b/coordinate/v1/coordinate-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "coordinate:v1"
const apiName = "coordinate"
@@ -416,6 +416,7 @@
s *Service
teamId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of custom field definitions for a team.
@@ -433,6 +434,14 @@
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 *CustomFieldDefListCall) Context(ctx context.Context) *CustomFieldDefListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CustomFieldDefListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -447,6 +456,9 @@
"teamId": c.teamId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -498,6 +510,7 @@
teamId string
jobId uint64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a job, including all the changes made to the job.
@@ -516,6 +529,14 @@
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 *JobsGetCall) Context(ctx context.Context) *JobsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *JobsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -531,6 +552,9 @@
"jobId": strconv.FormatUint(c.jobId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -594,6 +618,7 @@
title string
job *Job
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new job. Only the state field of the job should be
@@ -657,6 +682,14 @@
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 *JobsInsertCall) Context(ctx context.Context) *JobsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *JobsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.job)
@@ -696,6 +729,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -804,6 +840,7 @@
s *Service
teamId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves jobs created or modified since the given timestamp.
@@ -849,6 +886,14 @@
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 *JobsListCall) Context(ctx context.Context) *JobsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *JobsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -875,6 +920,9 @@
"teamId": c.teamId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -949,6 +997,7 @@
jobId uint64
job *Job
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a job. Fields that are set in the job state will be
@@ -1049,6 +1098,14 @@
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 *JobsPatchCall) Context(ctx context.Context) *JobsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *JobsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.job)
@@ -1100,6 +1157,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1229,6 +1289,7 @@
jobId uint64
job *Job
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a job. Fields that are set in the job state will be
@@ -1329,6 +1390,14 @@
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 *JobsUpdateCall) Context(ctx context.Context) *JobsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *JobsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.job)
@@ -1380,6 +1449,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1509,6 +1581,7 @@
workerEmail string
startTimestampMs uint64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of locations for a worker.
@@ -1541,6 +1614,14 @@
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 *LocationListCall) Context(ctx context.Context) *LocationListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LocationListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1563,6 +1644,9 @@
"workerEmail": c.workerEmail,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1640,6 +1724,7 @@
teamId string
jobId uint64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves the schedule for a job.
@@ -1658,6 +1743,14 @@
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 *ScheduleGetCall) Context(ctx context.Context) *ScheduleGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ScheduleGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1673,6 +1766,9 @@
"jobId": strconv.FormatUint(c.jobId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1733,6 +1829,7 @@
jobId uint64
schedule *Schedule
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Replaces the schedule of a job with the provided schedule.
@@ -1782,6 +1879,14 @@
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 *SchedulePatchCall) Context(ctx context.Context) *SchedulePatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SchedulePatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.schedule)
@@ -1815,6 +1920,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1900,6 +2008,7 @@
jobId uint64
schedule *Schedule
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Replaces the schedule of a job with the provided schedule.
@@ -1948,6 +2057,14 @@
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 *ScheduleUpdateCall) Context(ctx context.Context) *ScheduleUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ScheduleUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.schedule)
@@ -1981,6 +2098,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2063,6 +2183,7 @@
type TeamListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of teams for a user.
@@ -2100,6 +2221,14 @@
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 *TeamListCall) Context(ctx context.Context) *TeamListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TeamListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2121,6 +2250,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2177,6 +2309,7 @@
s *Service
teamId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of workers in a team.
@@ -2194,6 +2327,14 @@
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 *WorkerListCall) Context(ctx context.Context) *WorkerListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *WorkerListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2208,6 +2349,9 @@
"teamId": c.teamId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/customsearch/v1/customsearch-gen.go b/customsearch/v1/customsearch-gen.go
index a6f63ab..17905a7 100644
--- a/customsearch/v1/customsearch-gen.go
+++ b/customsearch/v1/customsearch-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "customsearch:v1"
const apiName = "customsearch"
@@ -301,6 +301,7 @@
s *Service
q string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns metadata about the search performed, metadata about the
@@ -629,6 +630,14 @@
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 *CseListCall) Context(ctx context.Context) *CseListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CseListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -735,6 +744,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/dataflow/v1b3/dataflow-gen.go b/dataflow/v1b3/dataflow-gen.go
index 8c49f27..051a846 100644
--- a/dataflow/v1b3/dataflow-gen.go
+++ b/dataflow/v1b3/dataflow-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "dataflow:v1b3"
const apiName = "dataflow"
@@ -1724,6 +1724,7 @@
projectId string
job *Job
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a dataflow job.
@@ -1761,6 +1762,14 @@
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 *ProjectsJobsCreateCall) Context(ctx context.Context) *ProjectsJobsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsJobsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.job)
@@ -1787,6 +1796,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1856,6 +1868,7 @@
projectId string
jobId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the state of the specified dataflow job.
@@ -1886,6 +1899,14 @@
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 *ProjectsJobsGetCall) Context(ctx context.Context) *ProjectsJobsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsJobsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1904,6 +1925,9 @@
"jobId": c.jobId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1972,6 +1996,7 @@
projectId string
jobId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetMetrics: Request the job status.
@@ -1998,6 +2023,14 @@
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 *ProjectsJobsGetMetricsCall) Context(ctx context.Context) *ProjectsJobsGetMetricsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsJobsGetMetricsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2016,6 +2049,9 @@
"jobId": c.jobId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2078,6 +2114,7 @@
s *Service
projectId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List the jobs of a project
@@ -2124,6 +2161,14 @@
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 *ProjectsJobsListCall) Context(ctx context.Context) *ProjectsJobsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsJobsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2147,6 +2192,9 @@
"projectId": c.projectId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2220,6 +2268,7 @@
jobId string
job *Job
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates the state of an existing dataflow job.
@@ -2239,6 +2288,14 @@
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 *ProjectsJobsUpdateCall) Context(ctx context.Context) *ProjectsJobsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsJobsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.job)
@@ -2260,6 +2317,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2321,6 +2381,7 @@
projectId string
jobId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Request the job status.
@@ -2387,6 +2448,14 @@
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 *ProjectsJobsMessagesListCall) Context(ctx context.Context) *ProjectsJobsMessagesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsJobsMessagesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2417,6 +2486,9 @@
"jobId": c.jobId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2510,6 +2582,7 @@
jobId string
leaseworkitemrequest *LeaseWorkItemRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Lease: Leases a dataflow WorkItem to run.
@@ -2529,6 +2602,14 @@
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 *ProjectsJobsWorkItemsLeaseCall) Context(ctx context.Context) *ProjectsJobsWorkItemsLeaseCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsJobsWorkItemsLeaseCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.leaseworkitemrequest)
@@ -2550,6 +2631,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2612,6 +2696,7 @@
jobId string
reportworkitemstatusrequest *ReportWorkItemStatusRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ReportStatus: Reports the status of dataflow WorkItems leased by a
@@ -2632,6 +2717,14 @@
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 *ProjectsJobsWorkItemsReportStatusCall) Context(ctx context.Context) *ProjectsJobsWorkItemsReportStatusCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsJobsWorkItemsReportStatusCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.reportworkitemstatusrequest)
@@ -2653,6 +2746,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/datastore/v1beta1/datastore-gen.go b/datastore/v1beta1/datastore-gen.go
index 79d00d7..9c7168e 100644
--- a/datastore/v1beta1/datastore-gen.go
+++ b/datastore/v1beta1/datastore-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "datastore:v1beta1"
const apiName = "datastore"
@@ -575,6 +575,7 @@
datasetId string
allocateidsrequest *AllocateIdsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AllocateIds: Allocate IDs for incomplete keys (useful for referencing
@@ -594,6 +595,14 @@
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 *DatasetsAllocateIdsCall) Context(ctx context.Context) *DatasetsAllocateIdsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsAllocateIdsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.allocateidsrequest)
@@ -614,6 +623,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -669,6 +681,7 @@
datasetId string
begintransactionrequest *BeginTransactionRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BeginTransaction: Begin a new transaction.
@@ -687,6 +700,14 @@
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 *DatasetsBeginTransactionCall) Context(ctx context.Context) *DatasetsBeginTransactionCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsBeginTransactionCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.begintransactionrequest)
@@ -707,6 +728,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -762,6 +786,7 @@
datasetId string
blindwriterequest *BlindWriteRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BlindWrite: Create, delete or modify some entities outside a
@@ -781,6 +806,14 @@
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 *DatasetsBlindWriteCall) Context(ctx context.Context) *DatasetsBlindWriteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsBlindWriteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.blindwriterequest)
@@ -801,6 +834,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -856,6 +892,7 @@
datasetId string
commitrequest *CommitRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Commit: Commit a transaction, optionally creating, deleting or
@@ -875,6 +912,14 @@
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 *DatasetsCommitCall) Context(ctx context.Context) *DatasetsCommitCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsCommitCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.commitrequest)
@@ -895,6 +940,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -950,6 +998,7 @@
datasetId string
lookuprequest *LookupRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Lookup: Look up some entities by key.
@@ -968,6 +1017,14 @@
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 *DatasetsLookupCall) Context(ctx context.Context) *DatasetsLookupCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsLookupCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.lookuprequest)
@@ -988,6 +1045,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1043,6 +1103,7 @@
datasetId string
rollbackrequest *RollbackRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Rollback: Roll back a transaction.
@@ -1061,6 +1122,14 @@
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 *DatasetsRollbackCall) Context(ctx context.Context) *DatasetsRollbackCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsRollbackCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.rollbackrequest)
@@ -1081,6 +1150,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1136,6 +1208,7 @@
datasetId string
runqueryrequest *RunQueryRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// RunQuery: Query for entities.
@@ -1154,6 +1227,14 @@
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 *DatasetsRunQueryCall) Context(ctx context.Context) *DatasetsRunQueryCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsRunQueryCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.runqueryrequest)
@@ -1174,6 +1255,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/datastore/v1beta2/datastore-gen.go b/datastore/v1beta2/datastore-gen.go
index 041c5dd..6a2cfef 100644
--- a/datastore/v1beta2/datastore-gen.go
+++ b/datastore/v1beta2/datastore-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "datastore:v1beta2"
const apiName = "datastore"
@@ -647,6 +647,7 @@
datasetId string
allocateidsrequest *AllocateIdsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AllocateIds: Allocate IDs for incomplete keys (useful for referencing
@@ -666,6 +667,14 @@
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 *DatasetsAllocateIdsCall) Context(ctx context.Context) *DatasetsAllocateIdsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsAllocateIdsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.allocateidsrequest)
@@ -686,6 +695,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -741,6 +753,7 @@
datasetId string
begintransactionrequest *BeginTransactionRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BeginTransaction: Begin a new transaction.
@@ -759,6 +772,14 @@
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 *DatasetsBeginTransactionCall) Context(ctx context.Context) *DatasetsBeginTransactionCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsBeginTransactionCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.begintransactionrequest)
@@ -779,6 +800,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -834,6 +858,7 @@
datasetId string
commitrequest *CommitRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Commit: Commit a transaction, optionally creating, deleting or
@@ -853,6 +878,14 @@
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 *DatasetsCommitCall) Context(ctx context.Context) *DatasetsCommitCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsCommitCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.commitrequest)
@@ -873,6 +906,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -928,6 +964,7 @@
datasetId string
lookuprequest *LookupRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Lookup: Look up some entities by key.
@@ -946,6 +983,14 @@
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 *DatasetsLookupCall) Context(ctx context.Context) *DatasetsLookupCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsLookupCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.lookuprequest)
@@ -966,6 +1011,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1021,6 +1069,7 @@
datasetId string
rollbackrequest *RollbackRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Rollback: Roll back a transaction.
@@ -1039,6 +1088,14 @@
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 *DatasetsRollbackCall) Context(ctx context.Context) *DatasetsRollbackCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsRollbackCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.rollbackrequest)
@@ -1059,6 +1116,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1114,6 +1174,7 @@
datasetId string
runqueryrequest *RunQueryRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// RunQuery: Query for entities.
@@ -1132,6 +1193,14 @@
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 *DatasetsRunQueryCall) Context(ctx context.Context) *DatasetsRunQueryCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsRunQueryCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.runqueryrequest)
@@ -1152,6 +1221,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/deploymentmanager/v2/deploymentmanager-gen.go b/deploymentmanager/v2/deploymentmanager-gen.go
index 81a0f83..c177ded 100644
--- a/deploymentmanager/v2/deploymentmanager-gen.go
+++ b/deploymentmanager/v2/deploymentmanager-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "deploymentmanager:v2"
const apiName = "deploymentmanager"
@@ -632,6 +632,7 @@
deployment string
deploymentscancelpreviewrequest *DeploymentsCancelPreviewRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// CancelPreview: Cancels and removes the preview currently associated
@@ -652,6 +653,14 @@
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 *DeploymentsCancelPreviewCall) Context(ctx context.Context) *DeploymentsCancelPreviewCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DeploymentsCancelPreviewCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.deploymentscancelpreviewrequest)
@@ -673,6 +682,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -736,6 +748,7 @@
project string
deployment string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a deployment and all of the resources in the
@@ -755,6 +768,14 @@
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 *DeploymentsDeleteCall) Context(ctx context.Context) *DeploymentsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DeploymentsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -770,6 +791,9 @@
"deployment": c.deployment,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -830,6 +854,7 @@
project string
deployment string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets information about a specific deployment.
@@ -848,6 +873,14 @@
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 *DeploymentsGetCall) Context(ctx context.Context) *DeploymentsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DeploymentsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -863,6 +896,9 @@
"deployment": c.deployment,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -925,6 +961,7 @@
project string
deployment *Deployment
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a deployment and all of the resources described by
@@ -958,6 +995,14 @@
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 *DeploymentsInsertCall) Context(ctx context.Context) *DeploymentsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DeploymentsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.deployment)
@@ -981,6 +1026,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1040,6 +1088,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all deployments for a given project.
@@ -1093,6 +1142,14 @@
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 *DeploymentsListCall) Context(ctx context.Context) *DeploymentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DeploymentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1116,6 +1173,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1190,6 +1250,7 @@
deployment string
deployment2 *Deployment
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a deployment and all of the resources described by the
@@ -1248,6 +1309,14 @@
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 *DeploymentsPatchCall) Context(ctx context.Context) *DeploymentsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DeploymentsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.deployment2)
@@ -1278,6 +1347,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1376,6 +1448,7 @@
deployment string
deploymentsstoprequest *DeploymentsStopRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Stop: Stops an ongoing operation. This does not roll back any work
@@ -1397,6 +1470,14 @@
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 *DeploymentsStopCall) Context(ctx context.Context) *DeploymentsStopCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DeploymentsStopCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.deploymentsstoprequest)
@@ -1418,6 +1499,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1482,6 +1566,7 @@
deployment string
deployment2 *Deployment
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a deployment and all of the resources described by
@@ -1540,6 +1625,14 @@
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 *DeploymentsUpdateCall) Context(ctx context.Context) *DeploymentsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DeploymentsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.deployment2)
@@ -1570,6 +1663,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1668,6 +1764,7 @@
deployment string
manifest string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets information about a specific manifest.
@@ -1687,6 +1784,14 @@
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 *ManifestsGetCall) Context(ctx context.Context) *ManifestsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManifestsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1703,6 +1808,9 @@
"manifest": c.manifest,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1773,6 +1881,7 @@
project string
deployment string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all manifests for a given deployment.
@@ -1827,6 +1936,14 @@
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 *ManifestsListCall) Context(ctx context.Context) *ManifestsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManifestsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1851,6 +1968,9 @@
"deployment": c.deployment,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1932,6 +2052,7 @@
project string
operation string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets information about a specific operation.
@@ -1950,6 +2071,14 @@
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 *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1965,6 +2094,9 @@
"operation": c.operation,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2025,6 +2157,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all operations for a project.
@@ -2078,6 +2211,14 @@
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 *OperationsListCall) Context(ctx context.Context) *OperationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2101,6 +2242,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2175,6 +2319,7 @@
deployment string
resource string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets information about a single resource.
@@ -2194,6 +2339,14 @@
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 *ResourcesGetCall) Context(ctx context.Context) *ResourcesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ResourcesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2210,6 +2363,9 @@
"resource": c.resource,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2279,6 +2435,7 @@
project string
deployment string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all resources in a given deployment.
@@ -2333,6 +2490,14 @@
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 *ResourcesListCall) Context(ctx context.Context) *ResourcesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ResourcesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2357,6 +2522,9 @@
"deployment": c.deployment,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2437,6 +2605,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all resource types for Deployment Manager.
@@ -2490,6 +2659,14 @@
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 *TypesListCall) Context(ctx context.Context) *TypesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TypesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2513,6 +2690,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/deploymentmanager/v2beta1/deploymentmanager-gen.go b/deploymentmanager/v2beta1/deploymentmanager-gen.go
index 10ee1cb..b443f7d 100644
--- a/deploymentmanager/v2beta1/deploymentmanager-gen.go
+++ b/deploymentmanager/v2beta1/deploymentmanager-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "deploymentmanager:v2beta1"
const apiName = "deploymentmanager"
@@ -397,6 +397,7 @@
project string
deployment string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: ! Deletes a deployment and all of the resources in the
@@ -416,6 +417,14 @@
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 *DeploymentsDeleteCall) Context(ctx context.Context) *DeploymentsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DeploymentsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -431,6 +440,9 @@
"deployment": c.deployment,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -491,6 +503,7 @@
project string
deployment string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: ! Gets information about a specific deployment.
@@ -509,6 +522,14 @@
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 *DeploymentsGetCall) Context(ctx context.Context) *DeploymentsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DeploymentsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -524,6 +545,9 @@
"deployment": c.deployment,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -586,6 +610,7 @@
project string
deployment *Deployment
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: ! Creates a deployment and all of the resources described by
@@ -605,6 +630,14 @@
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 *DeploymentsInsertCall) Context(ctx context.Context) *DeploymentsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DeploymentsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.deployment)
@@ -625,6 +658,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -679,6 +715,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: ! Lists all deployments for a given project.
@@ -713,6 +750,14 @@
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 *DeploymentsListCall) Context(ctx context.Context) *DeploymentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DeploymentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -733,6 +778,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -802,6 +850,7 @@
deployment string
manifest string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: ! Gets information about a specific manifest.
@@ -821,6 +870,14 @@
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 *ManifestsGetCall) Context(ctx context.Context) *ManifestsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManifestsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -837,6 +894,9 @@
"manifest": c.manifest,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -907,6 +967,7 @@
project string
deployment string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: ! Lists all manifests for a given deployment.
@@ -942,6 +1003,14 @@
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 *ManifestsListCall) Context(ctx context.Context) *ManifestsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManifestsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -963,6 +1032,9 @@
"deployment": c.deployment,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1039,6 +1111,7 @@
project string
operation string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: ! Gets information about a specific Operation.
@@ -1057,6 +1130,14 @@
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 *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1072,6 +1153,9 @@
"operation": c.operation,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1132,6 +1216,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: ! Lists all Operations for a project.
@@ -1166,6 +1251,14 @@
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 *OperationsListCall) Context(ctx context.Context) *OperationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1186,6 +1279,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1255,6 +1351,7 @@
deployment string
resource string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: ! Gets information about a single resource.
@@ -1274,6 +1371,14 @@
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 *ResourcesGetCall) Context(ctx context.Context) *ResourcesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ResourcesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1290,6 +1395,9 @@
"resource": c.resource,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1360,6 +1468,7 @@
project string
deployment string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: ! Lists all resources in a given deployment.
@@ -1395,6 +1504,14 @@
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 *ResourcesListCall) Context(ctx context.Context) *ResourcesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ResourcesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1416,6 +1533,9 @@
"deployment": c.deployment,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1491,6 +1611,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: ! Lists all Types for Deployment Manager.
@@ -1525,6 +1646,14 @@
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 *TypesListCall) Context(ctx context.Context) *TypesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TypesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1545,6 +1674,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/deploymentmanager/v2beta2/deploymentmanager-gen.go b/deploymentmanager/v2beta2/deploymentmanager-gen.go
index 35ece38..dbf2591 100644
--- a/deploymentmanager/v2beta2/deploymentmanager-gen.go
+++ b/deploymentmanager/v2beta2/deploymentmanager-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "deploymentmanager:v2beta2"
const apiName = "deploymentmanager"
@@ -559,6 +559,7 @@
project string
deployment string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a deployment and all of the resources in the
@@ -578,6 +579,14 @@
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 *DeploymentsDeleteCall) Context(ctx context.Context) *DeploymentsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DeploymentsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -593,6 +602,9 @@
"deployment": c.deployment,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -653,6 +665,7 @@
project string
deployment string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets information about a specific deployment.
@@ -671,6 +684,14 @@
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 *DeploymentsGetCall) Context(ctx context.Context) *DeploymentsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DeploymentsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -686,6 +707,9 @@
"deployment": c.deployment,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -748,6 +772,7 @@
project string
deployment *Deployment
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a deployment and all of the resources described by
@@ -767,6 +792,14 @@
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 *DeploymentsInsertCall) Context(ctx context.Context) *DeploymentsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DeploymentsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.deployment)
@@ -787,6 +820,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -841,6 +877,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all deployments for a given project.
@@ -894,6 +931,14 @@
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 *DeploymentsListCall) Context(ctx context.Context) *DeploymentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DeploymentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -917,6 +962,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -991,6 +1039,7 @@
deployment string
deployment2 *Deployment
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a deployment and all of the resources described by the
@@ -1044,6 +1093,14 @@
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 *DeploymentsPatchCall) Context(ctx context.Context) *DeploymentsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DeploymentsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.deployment2)
@@ -1074,6 +1131,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1180,6 +1240,7 @@
deployment string
deployment2 *Deployment
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a deployment and all of the resources described by
@@ -1233,6 +1294,14 @@
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 *DeploymentsUpdateCall) Context(ctx context.Context) *DeploymentsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DeploymentsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.deployment2)
@@ -1263,6 +1332,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1369,6 +1441,7 @@
deployment string
manifest string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets information about a specific manifest.
@@ -1388,6 +1461,14 @@
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 *ManifestsGetCall) Context(ctx context.Context) *ManifestsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManifestsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1404,6 +1485,9 @@
"manifest": c.manifest,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1474,6 +1558,7 @@
project string
deployment string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all manifests for a given deployment.
@@ -1528,6 +1613,14 @@
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 *ManifestsListCall) Context(ctx context.Context) *ManifestsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManifestsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1552,6 +1645,9 @@
"deployment": c.deployment,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1633,6 +1729,7 @@
project string
operation string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets information about a specific operation.
@@ -1651,6 +1748,14 @@
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 *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1666,6 +1771,9 @@
"operation": c.operation,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1726,6 +1834,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all operations for a project.
@@ -1779,6 +1888,14 @@
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 *OperationsListCall) Context(ctx context.Context) *OperationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1802,6 +1919,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1876,6 +1996,7 @@
deployment string
resource string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets information about a single resource.
@@ -1895,6 +2016,14 @@
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 *ResourcesGetCall) Context(ctx context.Context) *ResourcesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ResourcesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1911,6 +2040,9 @@
"resource": c.resource,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1980,6 +2112,7 @@
project string
deployment string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all resources in a given deployment.
@@ -2034,6 +2167,14 @@
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 *ResourcesListCall) Context(ctx context.Context) *ResourcesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ResourcesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2058,6 +2199,9 @@
"deployment": c.deployment,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2138,6 +2282,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all resource types for Deployment Manager.
@@ -2191,6 +2336,14 @@
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 *TypesListCall) Context(ctx context.Context) *TypesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TypesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2214,6 +2367,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/dfareporting/v1.1/dfareporting-gen.go b/dfareporting/v1.1/dfareporting-gen.go
index 8058d02..7a45619 100644
--- a/dfareporting/v1.1/dfareporting-gen.go
+++ b/dfareporting/v1.1/dfareporting-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "dfareporting:v1.1"
const apiName = "dfareporting"
@@ -824,6 +824,7 @@
profileId int64
dimensionvaluerequest *DimensionValueRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Query: Retrieves list of report dimension values for a list of
@@ -857,6 +858,14 @@
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 *DimensionValuesQueryCall) Context(ctx context.Context) *DimensionValuesQueryCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DimensionValuesQueryCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.dimensionvaluerequest)
@@ -883,6 +892,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -949,6 +961,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists files for a user profile.
@@ -1002,6 +1015,14 @@
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 *FilesListCall) Context(ctx context.Context) *FilesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FilesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1028,6 +1049,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1120,6 +1144,7 @@
profileId int64
reportId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a report by its ID.
@@ -1138,6 +1163,14 @@
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 *ReportsDeleteCall) Context(ctx context.Context) *ReportsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1153,6 +1186,9 @@
"reportId": strconv.FormatInt(c.reportId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1205,6 +1241,7 @@
profileId int64
reportId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a report by its ID.
@@ -1223,6 +1260,14 @@
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 *ReportsGetCall) Context(ctx context.Context) *ReportsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1238,6 +1283,9 @@
"reportId": strconv.FormatInt(c.reportId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1297,6 +1345,7 @@
profileId int64
report *Report
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a report.
@@ -1315,6 +1364,14 @@
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 *ReportsInsertCall) Context(ctx context.Context) *ReportsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
@@ -1335,6 +1392,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1388,6 +1448,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves list of reports.
@@ -1442,6 +1503,14 @@
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 *ReportsListCall) Context(ctx context.Context) *ReportsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1468,6 +1537,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1563,6 +1635,7 @@
reportId int64
report *Report
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a report. This method supports patch semantics.
@@ -1582,6 +1655,14 @@
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 *ReportsPatchCall) Context(ctx context.Context) *ReportsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
@@ -1603,6 +1684,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1665,6 +1749,7 @@
profileId int64
reportId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Run: Runs a report.
@@ -1690,6 +1775,14 @@
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 *ReportsRunCall) Context(ctx context.Context) *ReportsRunCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsRunCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1708,6 +1801,9 @@
"reportId": strconv.FormatInt(c.reportId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1773,6 +1869,7 @@
reportId int64
report *Report
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a report.
@@ -1792,6 +1889,14 @@
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 *ReportsUpdateCall) Context(ctx context.Context) *ReportsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
@@ -1813,6 +1918,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1876,6 +1984,7 @@
reportId int64
fileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a report file.
@@ -1895,6 +2004,14 @@
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 *ReportsFilesGetCall) Context(ctx context.Context) *ReportsFilesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsFilesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1911,6 +2028,9 @@
"fileId": strconv.FormatInt(c.fileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1978,6 +2098,7 @@
profileId int64
reportId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists files for a report.
@@ -2032,6 +2153,14 @@
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 *ReportsFilesListCall) Context(ctx context.Context) *ReportsFilesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsFilesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2059,6 +2188,9 @@
"reportId": strconv.FormatInt(c.reportId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2158,6 +2290,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one user profile by ID.
@@ -2175,6 +2308,14 @@
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 *UserProfilesGetCall) Context(ctx context.Context) *UserProfilesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserProfilesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2189,6 +2330,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2238,6 +2382,7 @@
type UserProfilesListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves list of user profiles for a user.
@@ -2254,6 +2399,14 @@
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 *UserProfilesListCall) Context(ctx context.Context) *UserProfilesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserProfilesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2266,6 +2419,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/dfareporting/v1.2/dfareporting-gen.go b/dfareporting/v1.2/dfareporting-gen.go
index db25c9e..4035ba6 100644
--- a/dfareporting/v1.2/dfareporting-gen.go
+++ b/dfareporting/v1.2/dfareporting-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "dfareporting:v1.2"
const apiName = "dfareporting"
@@ -835,6 +835,7 @@
profileId int64
dimensionvaluerequest *DimensionValueRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Query: Retrieves list of report dimension values for a list of
@@ -868,6 +869,14 @@
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 *DimensionValuesQueryCall) Context(ctx context.Context) *DimensionValuesQueryCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DimensionValuesQueryCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.dimensionvaluerequest)
@@ -894,6 +903,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -961,6 +973,7 @@
reportId int64
fileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a report file by its report ID and file ID.
@@ -979,6 +992,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *FilesGetCall) Context(ctx context.Context) *FilesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FilesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -994,6 +1015,9 @@
"fileId": strconv.FormatInt(c.fileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1068,6 +1092,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists files for a user profile.
@@ -1133,6 +1158,14 @@
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 *FilesListCall) Context(ctx context.Context) *FilesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FilesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1162,6 +1195,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1270,6 +1306,7 @@
profileId int64
reportId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a report by its ID.
@@ -1288,6 +1325,14 @@
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 *ReportsDeleteCall) Context(ctx context.Context) *ReportsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1303,6 +1348,9 @@
"reportId": strconv.FormatInt(c.reportId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1355,6 +1403,7 @@
profileId int64
reportId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a report by its ID.
@@ -1373,6 +1422,14 @@
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 *ReportsGetCall) Context(ctx context.Context) *ReportsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1388,6 +1445,9 @@
"reportId": strconv.FormatInt(c.reportId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1447,6 +1507,7 @@
profileId int64
report *Report
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a report.
@@ -1465,6 +1526,14 @@
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 *ReportsInsertCall) Context(ctx context.Context) *ReportsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
@@ -1485,6 +1554,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1538,6 +1610,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves list of reports.
@@ -1603,6 +1676,14 @@
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 *ReportsListCall) Context(ctx context.Context) *ReportsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1632,6 +1713,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1741,6 +1825,7 @@
reportId int64
report *Report
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a report. This method supports patch semantics.
@@ -1760,6 +1845,14 @@
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 *ReportsPatchCall) Context(ctx context.Context) *ReportsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
@@ -1781,6 +1874,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1843,6 +1939,7 @@
profileId int64
reportId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Run: Runs a report.
@@ -1868,6 +1965,14 @@
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 *ReportsRunCall) Context(ctx context.Context) *ReportsRunCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsRunCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1886,6 +1991,9 @@
"reportId": strconv.FormatInt(c.reportId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1951,6 +2059,7 @@
reportId int64
report *Report
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a report.
@@ -1970,6 +2079,14 @@
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 *ReportsUpdateCall) Context(ctx context.Context) *ReportsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
@@ -1991,6 +2108,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2054,6 +2174,7 @@
reportId int64
fileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a report file.
@@ -2073,6 +2194,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *ReportsFilesGetCall) Context(ctx context.Context) *ReportsFilesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsFilesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2089,6 +2218,9 @@
"fileId": strconv.FormatInt(c.fileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2172,6 +2304,7 @@
profileId int64
reportId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists files for a report.
@@ -2226,6 +2359,14 @@
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 *ReportsFilesListCall) Context(ctx context.Context) *ReportsFilesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsFilesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2253,6 +2394,9 @@
"reportId": strconv.FormatInt(c.reportId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2352,6 +2496,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one user profile by ID.
@@ -2369,6 +2514,14 @@
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 *UserProfilesGetCall) Context(ctx context.Context) *UserProfilesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserProfilesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2383,6 +2536,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2432,6 +2588,7 @@
type UserProfilesListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves list of user profiles for a user.
@@ -2448,6 +2605,14 @@
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 *UserProfilesListCall) Context(ctx context.Context) *UserProfilesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserProfilesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2460,6 +2625,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/dfareporting/v1.3/dfareporting-gen.go b/dfareporting/v1.3/dfareporting-gen.go
index 78f1ff9..798d52d 100644
--- a/dfareporting/v1.3/dfareporting-gen.go
+++ b/dfareporting/v1.3/dfareporting-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "dfareporting:v1.3"
const apiName = "dfareporting"
@@ -1027,6 +1027,7 @@
profileId int64
dimensionvaluerequest *DimensionValueRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Query: Retrieves list of report dimension values for a list of
@@ -1060,6 +1061,14 @@
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 *DimensionValuesQueryCall) Context(ctx context.Context) *DimensionValuesQueryCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DimensionValuesQueryCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.dimensionvaluerequest)
@@ -1086,6 +1095,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1153,6 +1165,7 @@
reportId int64
fileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a report file by its report ID and file ID.
@@ -1171,6 +1184,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *FilesGetCall) Context(ctx context.Context) *FilesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FilesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1186,6 +1207,9 @@
"fileId": strconv.FormatInt(c.fileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1260,6 +1284,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists files for a user profile.
@@ -1325,6 +1350,14 @@
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 *FilesListCall) Context(ctx context.Context) *FilesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FilesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1354,6 +1387,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1462,6 +1498,7 @@
profileId int64
reportId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a report by its ID.
@@ -1480,6 +1517,14 @@
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 *ReportsDeleteCall) Context(ctx context.Context) *ReportsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1495,6 +1540,9 @@
"reportId": strconv.FormatInt(c.reportId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1547,6 +1595,7 @@
profileId int64
reportId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a report by its ID.
@@ -1565,6 +1614,14 @@
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 *ReportsGetCall) Context(ctx context.Context) *ReportsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1580,6 +1637,9 @@
"reportId": strconv.FormatInt(c.reportId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1639,6 +1699,7 @@
profileId int64
report *Report
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a report.
@@ -1657,6 +1718,14 @@
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 *ReportsInsertCall) Context(ctx context.Context) *ReportsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
@@ -1677,6 +1746,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1730,6 +1802,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves list of reports.
@@ -1795,6 +1868,14 @@
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 *ReportsListCall) Context(ctx context.Context) *ReportsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1824,6 +1905,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1933,6 +2017,7 @@
reportId int64
report *Report
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a report. This method supports patch semantics.
@@ -1952,6 +2037,14 @@
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 *ReportsPatchCall) Context(ctx context.Context) *ReportsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
@@ -1973,6 +2066,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2035,6 +2131,7 @@
profileId int64
reportId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Run: Runs a report.
@@ -2060,6 +2157,14 @@
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 *ReportsRunCall) Context(ctx context.Context) *ReportsRunCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsRunCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2078,6 +2183,9 @@
"reportId": strconv.FormatInt(c.reportId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2143,6 +2251,7 @@
reportId int64
report *Report
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a report.
@@ -2162,6 +2271,14 @@
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 *ReportsUpdateCall) Context(ctx context.Context) *ReportsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
@@ -2183,6 +2300,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2245,6 +2365,7 @@
profileId int64
report *Report
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Query: Returns the fields that are compatible to be selected in the
@@ -2265,6 +2386,14 @@
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 *ReportsCompatibleFieldsQueryCall) Context(ctx context.Context) *ReportsCompatibleFieldsQueryCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsCompatibleFieldsQueryCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
@@ -2285,6 +2414,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2340,6 +2472,7 @@
reportId int64
fileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a report file.
@@ -2359,6 +2492,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *ReportsFilesGetCall) Context(ctx context.Context) *ReportsFilesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsFilesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2375,6 +2516,9 @@
"fileId": strconv.FormatInt(c.fileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2458,6 +2602,7 @@
profileId int64
reportId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists files for a report.
@@ -2512,6 +2657,14 @@
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 *ReportsFilesListCall) Context(ctx context.Context) *ReportsFilesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsFilesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2539,6 +2692,9 @@
"reportId": strconv.FormatInt(c.reportId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2638,6 +2794,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one user profile by ID.
@@ -2655,6 +2812,14 @@
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 *UserProfilesGetCall) Context(ctx context.Context) *UserProfilesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserProfilesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2669,6 +2834,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2718,6 +2886,7 @@
type UserProfilesListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves list of user profiles for a user.
@@ -2734,6 +2903,14 @@
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 *UserProfilesListCall) Context(ctx context.Context) *UserProfilesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserProfilesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2746,6 +2923,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/dfareporting/v1/dfareporting-gen.go b/dfareporting/v1/dfareporting-gen.go
index 2f6eaba..31e33d6 100644
--- a/dfareporting/v1/dfareporting-gen.go
+++ b/dfareporting/v1/dfareporting-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "dfareporting:v1"
const apiName = "dfareporting"
@@ -533,6 +533,7 @@
profileId int64
dimensionvaluerequest *DimensionValueRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Query: Retrieves list of report dimension values for a list of
@@ -566,6 +567,14 @@
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 *DimensionValuesQueryCall) Context(ctx context.Context) *DimensionValuesQueryCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DimensionValuesQueryCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.dimensionvaluerequest)
@@ -592,6 +601,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -658,6 +670,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists files for a user profile.
@@ -711,6 +724,14 @@
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 *FilesListCall) Context(ctx context.Context) *FilesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FilesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -737,6 +758,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -829,6 +853,7 @@
profileId int64
reportId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a report by its id.
@@ -847,6 +872,14 @@
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 *ReportsDeleteCall) Context(ctx context.Context) *ReportsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -862,6 +895,9 @@
"reportId": strconv.FormatInt(c.reportId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -914,6 +950,7 @@
profileId int64
reportId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a report by its id.
@@ -932,6 +969,14 @@
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 *ReportsGetCall) Context(ctx context.Context) *ReportsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -947,6 +992,9 @@
"reportId": strconv.FormatInt(c.reportId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1006,6 +1054,7 @@
profileId int64
report *Report
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a report.
@@ -1024,6 +1073,14 @@
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 *ReportsInsertCall) Context(ctx context.Context) *ReportsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
@@ -1044,6 +1101,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1097,6 +1157,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves list of reports.
@@ -1151,6 +1212,14 @@
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 *ReportsListCall) Context(ctx context.Context) *ReportsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1177,6 +1246,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1272,6 +1344,7 @@
reportId int64
report *Report
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a report. This method supports patch semantics.
@@ -1291,6 +1364,14 @@
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 *ReportsPatchCall) Context(ctx context.Context) *ReportsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
@@ -1312,6 +1393,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1374,6 +1458,7 @@
profileId int64
reportId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Run: Runs a report.
@@ -1399,6 +1484,14 @@
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 *ReportsRunCall) Context(ctx context.Context) *ReportsRunCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsRunCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1417,6 +1510,9 @@
"reportId": strconv.FormatInt(c.reportId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1482,6 +1578,7 @@
reportId int64
report *Report
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a report.
@@ -1501,6 +1598,14 @@
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 *ReportsUpdateCall) Context(ctx context.Context) *ReportsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
@@ -1522,6 +1627,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1585,6 +1693,7 @@
reportId int64
fileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a report file.
@@ -1604,6 +1713,14 @@
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 *ReportsFilesGetCall) Context(ctx context.Context) *ReportsFilesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsFilesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1620,6 +1737,9 @@
"fileId": strconv.FormatInt(c.fileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1687,6 +1807,7 @@
profileId int64
reportId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists files for a report.
@@ -1741,6 +1862,14 @@
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 *ReportsFilesListCall) Context(ctx context.Context) *ReportsFilesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsFilesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1768,6 +1897,9 @@
"reportId": strconv.FormatInt(c.reportId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1867,6 +1999,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one user profile by id.
@@ -1884,6 +2017,14 @@
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 *UserProfilesGetCall) Context(ctx context.Context) *UserProfilesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserProfilesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1898,6 +2039,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1947,6 +2091,7 @@
type UserProfilesListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves list of user profiles for a user.
@@ -1963,6 +2108,14 @@
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 *UserProfilesListCall) Context(ctx context.Context) *UserProfilesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserProfilesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1975,6 +2128,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/dfareporting/v2.0/dfareporting-gen.go b/dfareporting/v2.0/dfareporting-gen.go
index 0de19c7..3778a00 100644
--- a/dfareporting/v2.0/dfareporting-gen.go
+++ b/dfareporting/v2.0/dfareporting-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "dfareporting:v2.0"
const apiName = "dfareporting"
@@ -6477,6 +6477,7 @@
profileId int64
summaryAccountId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the account's active ad summary by account ID.
@@ -6495,6 +6496,14 @@
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 *AccountActiveAdSummariesGetCall) Context(ctx context.Context) *AccountActiveAdSummariesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountActiveAdSummariesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6510,6 +6519,9 @@
"summaryAccountId": strconv.FormatInt(c.summaryAccountId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6569,6 +6581,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one account permission group by ID.
@@ -6587,6 +6600,14 @@
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 *AccountPermissionGroupsGetCall) Context(ctx context.Context) *AccountPermissionGroupsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountPermissionGroupsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6602,6 +6623,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6660,6 +6684,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of account permission groups.
@@ -6677,6 +6702,14 @@
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 *AccountPermissionGroupsListCall) Context(ctx context.Context) *AccountPermissionGroupsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountPermissionGroupsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6691,6 +6724,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6742,6 +6778,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one account permission by ID.
@@ -6760,6 +6797,14 @@
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 *AccountPermissionsGetCall) Context(ctx context.Context) *AccountPermissionsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountPermissionsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6775,6 +6820,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6833,6 +6881,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of account permissions.
@@ -6850,6 +6899,14 @@
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 *AccountPermissionsListCall) Context(ctx context.Context) *AccountPermissionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountPermissionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6864,6 +6921,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6915,6 +6975,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one account user profile by ID.
@@ -6933,6 +6994,14 @@
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 *AccountUserProfilesGetCall) Context(ctx context.Context) *AccountUserProfilesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountUserProfilesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6948,6 +7017,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7006,6 +7078,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of account user profiles, possibly filtered.
@@ -7101,6 +7174,14 @@
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 *AccountUserProfilesListCall) Context(ctx context.Context) *AccountUserProfilesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountUserProfilesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7142,6 +7223,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7260,6 +7344,7 @@
id int64
accountuserprofile *AccountUserProfile
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing account user profile. This method supports
@@ -7280,6 +7365,14 @@
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 *AccountUserProfilesPatchCall) Context(ctx context.Context) *AccountUserProfilesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountUserProfilesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
@@ -7301,6 +7394,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7363,6 +7459,7 @@
profileId int64
accountuserprofile *AccountUserProfile
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing account user profile.
@@ -7381,6 +7478,14 @@
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 *AccountUserProfilesUpdateCall) Context(ctx context.Context) *AccountUserProfilesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountUserProfilesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
@@ -7401,6 +7506,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7455,6 +7563,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one account by ID.
@@ -7473,6 +7582,14 @@
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 *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7488,6 +7605,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7546,6 +7666,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of accounts, possibly filtered.
@@ -7627,6 +7748,14 @@
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 *AccountsListCall) Context(ctx context.Context) *AccountsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7662,6 +7791,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7768,6 +7900,7 @@
id int64
account *Account
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing account. This method supports patch
@@ -7788,6 +7921,14 @@
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 *AccountsPatchCall) Context(ctx context.Context) *AccountsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
@@ -7809,6 +7950,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7871,6 +8015,7 @@
profileId int64
account *Account
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing account.
@@ -7889,6 +8034,14 @@
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 *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
@@ -7909,6 +8062,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7963,6 +8119,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one ad by ID.
@@ -7981,6 +8138,14 @@
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 *AdsGetCall) Context(ctx context.Context) *AdsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7996,6 +8161,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8055,6 +8223,7 @@
profileId int64
ad *Ad
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new ad.
@@ -8073,6 +8242,14 @@
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 *AdsInsertCall) Context(ctx context.Context) *AdsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
@@ -8093,6 +8270,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8146,6 +8326,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of ads, possibly filtered.
@@ -8393,6 +8574,14 @@
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 *AdsListCall) Context(ctx context.Context) *AdsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8479,6 +8668,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8767,6 +8959,7 @@
id int64
ad *Ad
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing ad. This method supports patch semantics.
@@ -8786,6 +8979,14 @@
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 *AdsPatchCall) Context(ctx context.Context) *AdsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
@@ -8807,6 +9008,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8869,6 +9073,7 @@
profileId int64
ad *Ad
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing ad.
@@ -8887,6 +9092,14 @@
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 *AdsUpdateCall) Context(ctx context.Context) *AdsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
@@ -8907,6 +9120,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8961,6 +9177,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing advertiser group.
@@ -8979,6 +9196,14 @@
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 *AdvertiserGroupsDeleteCall) Context(ctx context.Context) *AdvertiserGroupsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertiserGroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8994,6 +9219,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9046,6 +9274,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one advertiser group by ID.
@@ -9064,6 +9293,14 @@
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 *AdvertiserGroupsGetCall) Context(ctx context.Context) *AdvertiserGroupsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertiserGroupsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9079,6 +9316,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9138,6 +9378,7 @@
profileId int64
advertisergroup *AdvertiserGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new advertiser group.
@@ -9156,6 +9397,14 @@
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 *AdvertiserGroupsInsertCall) Context(ctx context.Context) *AdvertiserGroupsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertiserGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
@@ -9176,6 +9425,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9229,6 +9481,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of advertiser groups, possibly filtered.
@@ -9303,6 +9556,14 @@
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 *AdvertiserGroupsListCall) Context(ctx context.Context) *AdvertiserGroupsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertiserGroupsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9335,6 +9596,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9436,6 +9700,7 @@
id int64
advertisergroup *AdvertiserGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing advertiser group. This method supports
@@ -9456,6 +9721,14 @@
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 *AdvertiserGroupsPatchCall) Context(ctx context.Context) *AdvertiserGroupsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertiserGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
@@ -9477,6 +9750,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9539,6 +9815,7 @@
profileId int64
advertisergroup *AdvertiserGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing advertiser group.
@@ -9557,6 +9834,14 @@
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 *AdvertiserGroupsUpdateCall) Context(ctx context.Context) *AdvertiserGroupsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertiserGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
@@ -9577,6 +9862,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9631,6 +9919,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one advertiser by ID.
@@ -9649,6 +9938,14 @@
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 *AdvertisersGetCall) Context(ctx context.Context) *AdvertisersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertisersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9664,6 +9961,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9723,6 +10023,7 @@
profileId int64
advertiser *Advertiser
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new advertiser.
@@ -9741,6 +10042,14 @@
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 *AdvertisersInsertCall) Context(ctx context.Context) *AdvertisersInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertisersInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
@@ -9761,6 +10070,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9814,6 +10126,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of advertisers, possibly filtered.
@@ -9935,6 +10248,14 @@
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 *AdvertisersListCall) Context(ctx context.Context) *AdvertisersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertisersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9985,6 +10306,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10129,6 +10453,7 @@
id int64
advertiser *Advertiser
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing advertiser. This method supports patch
@@ -10149,6 +10474,14 @@
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 *AdvertisersPatchCall) Context(ctx context.Context) *AdvertisersPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertisersPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
@@ -10170,6 +10503,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10232,6 +10568,7 @@
profileId int64
advertiser *Advertiser
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing advertiser.
@@ -10250,6 +10587,14 @@
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 *AdvertisersUpdateCall) Context(ctx context.Context) *AdvertisersUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertisersUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
@@ -10270,6 +10615,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10323,6 +10671,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of browsers.
@@ -10340,6 +10689,14 @@
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 *BrowsersListCall) Context(ctx context.Context) *BrowsersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BrowsersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10354,6 +10711,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10406,6 +10766,7 @@
campaignId int64
campaigncreativeassociation *CampaignCreativeAssociation
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Associates a creative with the specified campaign. This
@@ -10427,6 +10788,14 @@
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 *CampaignCreativeAssociationsInsertCall) Context(ctx context.Context) *CampaignCreativeAssociationsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CampaignCreativeAssociationsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaigncreativeassociation)
@@ -10448,6 +10817,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10510,6 +10882,7 @@
profileId int64
campaignId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of creative IDs associated with the
@@ -10554,6 +10927,14 @@
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 *CampaignCreativeAssociationsListCall) Context(ctx context.Context) *CampaignCreativeAssociationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CampaignCreativeAssociationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10578,6 +10959,9 @@
"campaignId": strconv.FormatInt(c.campaignId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10661,6 +11045,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one campaign by ID.
@@ -10679,6 +11064,14 @@
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 *CampaignsGetCall) Context(ctx context.Context) *CampaignsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CampaignsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10694,6 +11087,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10755,6 +11151,7 @@
defaultLandingPageUrl string
campaign *Campaign
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new campaign.
@@ -10775,6 +11172,14 @@
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 *CampaignsInsertCall) Context(ctx context.Context) *CampaignsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CampaignsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
@@ -10797,6 +11202,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10864,6 +11272,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of campaigns, possibly filtered.
@@ -10990,6 +11399,14 @@
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 *CampaignsListCall) Context(ctx context.Context) *CampaignsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CampaignsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -11043,6 +11460,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11187,6 +11607,7 @@
id int64
campaign *Campaign
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing campaign. This method supports patch
@@ -11207,6 +11628,14 @@
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 *CampaignsPatchCall) Context(ctx context.Context) *CampaignsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CampaignsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
@@ -11228,6 +11657,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11290,6 +11722,7 @@
profileId int64
campaign *Campaign
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing campaign.
@@ -11308,6 +11741,14 @@
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 *CampaignsUpdateCall) Context(ctx context.Context) *CampaignsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CampaignsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
@@ -11328,6 +11769,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11382,6 +11826,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one change log by ID.
@@ -11400,6 +11845,14 @@
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 *ChangeLogsGetCall) Context(ctx context.Context) *ChangeLogsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChangeLogsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -11415,6 +11868,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11473,6 +11929,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of change logs.
@@ -11630,6 +12087,14 @@
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 *ChangeLogsListCall) Context(ctx context.Context) *ChangeLogsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChangeLogsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -11674,6 +12139,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11895,6 +12363,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of cities, possibly filtered.
@@ -11940,6 +12409,14 @@
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 *CitiesListCall) Context(ctx context.Context) *CitiesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CitiesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -11966,6 +12443,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12042,6 +12522,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of connection types.
@@ -12059,6 +12540,14 @@
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 *ConnectionTypesListCall) Context(ctx context.Context) *ConnectionTypesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ConnectionTypesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -12073,6 +12562,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12124,6 +12616,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing content category.
@@ -12142,6 +12635,14 @@
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 *ContentCategoriesDeleteCall) Context(ctx context.Context) *ContentCategoriesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ContentCategoriesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -12157,6 +12658,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12209,6 +12713,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one content category by ID.
@@ -12227,6 +12732,14 @@
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 *ContentCategoriesGetCall) Context(ctx context.Context) *ContentCategoriesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ContentCategoriesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -12242,6 +12755,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12301,6 +12817,7 @@
profileId int64
contentcategory *ContentCategory
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new content category.
@@ -12319,6 +12836,14 @@
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 *ContentCategoriesInsertCall) Context(ctx context.Context) *ContentCategoriesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ContentCategoriesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
@@ -12339,6 +12864,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12392,6 +12920,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of content categories, possibly filtered.
@@ -12466,6 +12995,14 @@
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 *ContentCategoriesListCall) Context(ctx context.Context) *ContentCategoriesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ContentCategoriesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -12498,6 +13035,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12599,6 +13139,7 @@
id int64
contentcategory *ContentCategory
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing content category. This method supports
@@ -12619,6 +13160,14 @@
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 *ContentCategoriesPatchCall) Context(ctx context.Context) *ContentCategoriesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ContentCategoriesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
@@ -12640,6 +13189,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12702,6 +13254,7 @@
profileId int64
contentcategory *ContentCategory
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing content category.
@@ -12720,6 +13273,14 @@
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 *ContentCategoriesUpdateCall) Context(ctx context.Context) *ContentCategoriesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ContentCategoriesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
@@ -12740,6 +13301,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12794,6 +13358,7 @@
profileId int64
dartId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one country by ID.
@@ -12812,6 +13377,14 @@
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 *CountriesGetCall) Context(ctx context.Context) *CountriesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CountriesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -12827,6 +13400,9 @@
"dartId": strconv.FormatInt(c.dartId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12885,6 +13461,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of countries.
@@ -12902,6 +13479,14 @@
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 *CountriesListCall) Context(ctx context.Context) *CountriesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CountriesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -12916,6 +13501,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12971,8 +13559,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Insert: Inserts a new creative asset.
@@ -12992,10 +13580,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *CreativeAssetsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *CreativeAssetsInsertCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -13020,6 +13610,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *CreativeAssetsInsertCall) Context(ctx context.Context) *CreativeAssetsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeAssetsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativeassetmetadata)
@@ -13060,6 +13660,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13163,6 +13766,7 @@
creativeFieldId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing creative field value.
@@ -13182,6 +13786,14 @@
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 *CreativeFieldValuesDeleteCall) Context(ctx context.Context) *CreativeFieldValuesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldValuesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13198,6 +13810,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13259,6 +13874,7 @@
creativeFieldId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one creative field value by ID.
@@ -13278,6 +13894,14 @@
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 *CreativeFieldValuesGetCall) Context(ctx context.Context) *CreativeFieldValuesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldValuesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13294,6 +13918,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13362,6 +13989,7 @@
creativeFieldId int64
creativefieldvalue *CreativeFieldValue
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new creative field value.
@@ -13381,6 +14009,14 @@
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 *CreativeFieldValuesInsertCall) Context(ctx context.Context) *CreativeFieldValuesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldValuesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
@@ -13402,6 +14038,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13464,6 +14103,7 @@
profileId int64
creativeFieldId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of creative field values, possibly filtered.
@@ -13533,6 +14173,14 @@
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 *CreativeFieldValuesListCall) Context(ctx context.Context) *CreativeFieldValuesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldValuesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13566,6 +14214,9 @@
"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13676,6 +14327,7 @@
id int64
creativefieldvalue *CreativeFieldValue
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing creative field value. This method supports
@@ -13697,6 +14349,14 @@
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 *CreativeFieldValuesPatchCall) Context(ctx context.Context) *CreativeFieldValuesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldValuesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
@@ -13719,6 +14379,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13790,6 +14453,7 @@
creativeFieldId int64
creativefieldvalue *CreativeFieldValue
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing creative field value.
@@ -13809,6 +14473,14 @@
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 *CreativeFieldValuesUpdateCall) Context(ctx context.Context) *CreativeFieldValuesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldValuesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
@@ -13830,6 +14502,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13892,6 +14567,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing creative field.
@@ -13910,6 +14586,14 @@
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 *CreativeFieldsDeleteCall) Context(ctx context.Context) *CreativeFieldsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13925,6 +14609,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13977,6 +14664,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one creative field by ID.
@@ -13995,6 +14683,14 @@
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 *CreativeFieldsGetCall) Context(ctx context.Context) *CreativeFieldsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -14010,6 +14706,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14069,6 +14768,7 @@
profileId int64
creativefield *CreativeField
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new creative field.
@@ -14087,6 +14787,14 @@
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 *CreativeFieldsInsertCall) Context(ctx context.Context) *CreativeFieldsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
@@ -14107,6 +14815,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14160,6 +14871,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of creative fields, possibly filtered.
@@ -14241,6 +14953,14 @@
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 *CreativeFieldsListCall) Context(ctx context.Context) *CreativeFieldsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -14276,6 +14996,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14384,6 +15107,7 @@
id int64
creativefield *CreativeField
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing creative field. This method supports patch
@@ -14404,6 +15128,14 @@
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 *CreativeFieldsPatchCall) Context(ctx context.Context) *CreativeFieldsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
@@ -14425,6 +15157,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14487,6 +15222,7 @@
profileId int64
creativefield *CreativeField
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing creative field.
@@ -14505,6 +15241,14 @@
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 *CreativeFieldsUpdateCall) Context(ctx context.Context) *CreativeFieldsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
@@ -14525,6 +15269,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14579,6 +15326,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one creative group by ID.
@@ -14597,6 +15345,14 @@
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 *CreativeGroupsGetCall) Context(ctx context.Context) *CreativeGroupsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeGroupsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -14612,6 +15368,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14671,6 +15430,7 @@
profileId int64
creativegroup *CreativeGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new creative group.
@@ -14689,6 +15449,14 @@
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 *CreativeGroupsInsertCall) Context(ctx context.Context) *CreativeGroupsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
@@ -14709,6 +15477,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14762,6 +15533,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of creative groups, possibly filtered.
@@ -14850,6 +15622,14 @@
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 *CreativeGroupsListCall) Context(ctx context.Context) *CreativeGroupsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeGroupsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -14888,6 +15668,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15002,6 +15785,7 @@
id int64
creativegroup *CreativeGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing creative group. This method supports patch
@@ -15022,6 +15806,14 @@
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 *CreativeGroupsPatchCall) Context(ctx context.Context) *CreativeGroupsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
@@ -15043,6 +15835,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15105,6 +15900,7 @@
profileId int64
creativegroup *CreativeGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing creative group.
@@ -15123,6 +15919,14 @@
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 *CreativeGroupsUpdateCall) Context(ctx context.Context) *CreativeGroupsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
@@ -15143,6 +15947,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15197,6 +16004,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one creative by ID.
@@ -15215,6 +16023,14 @@
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 *CreativesGetCall) Context(ctx context.Context) *CreativesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -15230,6 +16046,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15289,6 +16108,7 @@
profileId int64
creative *Creative
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new creative.
@@ -15307,6 +16127,14 @@
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 *CreativesInsertCall) Context(ctx context.Context) *CreativesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
@@ -15327,6 +16155,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15380,6 +16211,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of creatives, possibly filtered.
@@ -15550,6 +16382,14 @@
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 *CreativesListCall) Context(ctx context.Context) *CreativesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -15612,6 +16452,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15827,6 +16670,7 @@
id int64
creative *Creative
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing creative. This method supports patch
@@ -15847,6 +16691,14 @@
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 *CreativesPatchCall) Context(ctx context.Context) *CreativesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
@@ -15868,6 +16720,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15930,6 +16785,7 @@
profileId int64
creative *Creative
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing creative.
@@ -15948,6 +16804,14 @@
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 *CreativesUpdateCall) Context(ctx context.Context) *CreativesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
@@ -15968,6 +16832,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16022,6 +16889,7 @@
profileId int64
dimensionvaluerequest *DimensionValueRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Query: Retrieves list of report dimension values for a list of
@@ -16055,6 +16923,14 @@
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 *DimensionValuesQueryCall) Context(ctx context.Context) *DimensionValuesQueryCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DimensionValuesQueryCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.dimensionvaluerequest)
@@ -16081,6 +16957,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16148,6 +17027,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one directory site contact by ID.
@@ -16166,6 +17046,14 @@
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 *DirectorySiteContactsGetCall) Context(ctx context.Context) *DirectorySiteContactsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DirectorySiteContactsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -16181,6 +17069,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16239,6 +17130,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of directory site contacts, possibly filtered.
@@ -16322,6 +17214,14 @@
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 *DirectorySiteContactsListCall) Context(ctx context.Context) *DirectorySiteContactsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DirectorySiteContactsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -16357,6 +17257,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16464,6 +17367,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one directory site by ID.
@@ -16482,6 +17386,14 @@
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 *DirectorySitesGetCall) Context(ctx context.Context) *DirectorySitesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DirectorySitesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -16497,6 +17409,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16555,6 +17470,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of directory sites, possibly filtered.
@@ -16682,6 +17598,14 @@
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 *DirectorySitesListCall) Context(ctx context.Context) *DirectorySitesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DirectorySitesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -16735,6 +17659,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16872,6 +17799,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing event tag.
@@ -16890,6 +17818,14 @@
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 *EventTagsDeleteCall) Context(ctx context.Context) *EventTagsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventTagsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -16905,6 +17841,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16957,6 +17896,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one event tag by ID.
@@ -16975,6 +17915,14 @@
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 *EventTagsGetCall) Context(ctx context.Context) *EventTagsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventTagsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -16990,6 +17938,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17049,6 +18000,7 @@
profileId int64
eventtag *EventTag
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new event tag.
@@ -17067,6 +18019,14 @@
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 *EventTagsInsertCall) Context(ctx context.Context) *EventTagsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventTagsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
@@ -17087,6 +18047,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17140,6 +18103,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of event tags, possibly filtered.
@@ -17261,6 +18225,14 @@
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 *EventTagsListCall) Context(ctx context.Context) *EventTagsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventTagsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -17305,6 +18277,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17439,6 +18414,7 @@
id int64
eventtag *EventTag
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing event tag. This method supports patch
@@ -17459,6 +18435,14 @@
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 *EventTagsPatchCall) Context(ctx context.Context) *EventTagsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventTagsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
@@ -17480,6 +18464,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17542,6 +18529,7 @@
profileId int64
eventtag *EventTag
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing event tag.
@@ -17560,6 +18548,14 @@
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 *EventTagsUpdateCall) Context(ctx context.Context) *EventTagsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventTagsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
@@ -17580,6 +18576,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17634,6 +18633,7 @@
reportId int64
fileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a report file by its report ID and file ID.
@@ -17652,6 +18652,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *FilesGetCall) Context(ctx context.Context) *FilesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FilesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -17667,6 +18675,9 @@
"fileId": strconv.FormatInt(c.fileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17741,6 +18752,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists files for a user profile.
@@ -17806,6 +18818,14 @@
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 *FilesListCall) Context(ctx context.Context) *FilesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FilesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -17835,6 +18855,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17943,6 +18966,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing floodlight activity.
@@ -17961,6 +18985,14 @@
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 *FloodlightActivitiesDeleteCall) Context(ctx context.Context) *FloodlightActivitiesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivitiesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -17976,6 +19008,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18027,6 +19062,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Generatetag: Generates a tag for a floodlight activity.
@@ -18052,6 +19088,14 @@
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 *FloodlightActivitiesGeneratetagCall) Context(ctx context.Context) *FloodlightActivitiesGeneratetagCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivitiesGeneratetagCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -18069,6 +19113,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18126,6 +19173,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one floodlight activity by ID.
@@ -18144,6 +19192,14 @@
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 *FloodlightActivitiesGetCall) Context(ctx context.Context) *FloodlightActivitiesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivitiesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -18159,6 +19215,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18218,6 +19277,7 @@
profileId int64
floodlightactivity *FloodlightActivity
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new floodlight activity.
@@ -18236,6 +19296,14 @@
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 *FloodlightActivitiesInsertCall) Context(ctx context.Context) *FloodlightActivitiesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivitiesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
@@ -18256,6 +19324,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18309,6 +19380,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of floodlight activities, possibly filtered.
@@ -18445,6 +19517,14 @@
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 *FloodlightActivitiesListCall) Context(ctx context.Context) *FloodlightActivitiesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivitiesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -18498,6 +19578,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18646,6 +19729,7 @@
id int64
floodlightactivity *FloodlightActivity
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing floodlight activity. This method supports
@@ -18666,6 +19750,14 @@
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 *FloodlightActivitiesPatchCall) Context(ctx context.Context) *FloodlightActivitiesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivitiesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
@@ -18687,6 +19779,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18749,6 +19844,7 @@
profileId int64
floodlightactivity *FloodlightActivity
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing floodlight activity.
@@ -18767,6 +19863,14 @@
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 *FloodlightActivitiesUpdateCall) Context(ctx context.Context) *FloodlightActivitiesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivitiesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
@@ -18787,6 +19891,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18841,6 +19948,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing floodlight activity group.
@@ -18859,6 +19967,14 @@
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 *FloodlightActivityGroupsDeleteCall) Context(ctx context.Context) *FloodlightActivityGroupsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivityGroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -18874,6 +19990,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18926,6 +20045,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one floodlight activity group by ID.
@@ -18944,6 +20064,14 @@
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 *FloodlightActivityGroupsGetCall) Context(ctx context.Context) *FloodlightActivityGroupsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivityGroupsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -18959,6 +20087,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19018,6 +20149,7 @@
profileId int64
floodlightactivitygroup *FloodlightActivityGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new floodlight activity group.
@@ -19036,6 +20168,14 @@
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 *FloodlightActivityGroupsInsertCall) Context(ctx context.Context) *FloodlightActivityGroupsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivityGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
@@ -19056,6 +20196,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19109,6 +20252,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of floodlight activity groups, possibly
@@ -19215,6 +20359,14 @@
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 *FloodlightActivityGroupsListCall) Context(ctx context.Context) *FloodlightActivityGroupsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivityGroupsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -19256,6 +20408,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19382,6 +20537,7 @@
id int64
floodlightactivitygroup *FloodlightActivityGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing floodlight activity group. This method
@@ -19402,6 +20558,14 @@
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 *FloodlightActivityGroupsPatchCall) Context(ctx context.Context) *FloodlightActivityGroupsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivityGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
@@ -19423,6 +20587,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19485,6 +20652,7 @@
profileId int64
floodlightactivitygroup *FloodlightActivityGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing floodlight activity group.
@@ -19503,6 +20671,14 @@
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 *FloodlightActivityGroupsUpdateCall) Context(ctx context.Context) *FloodlightActivityGroupsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivityGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
@@ -19523,6 +20699,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19577,6 +20756,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one floodlight configuration by ID.
@@ -19595,6 +20775,14 @@
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 *FloodlightConfigurationsGetCall) Context(ctx context.Context) *FloodlightConfigurationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightConfigurationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -19610,6 +20798,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19668,6 +20859,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of floodlight configurations, possibly
@@ -19694,6 +20886,14 @@
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 *FloodlightConfigurationsListCall) Context(ctx context.Context) *FloodlightConfigurationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightConfigurationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -19711,6 +20911,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19770,6 +20973,7 @@
id int64
floodlightconfiguration *FloodlightConfiguration
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing floodlight configuration. This method
@@ -19790,6 +20994,14 @@
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 *FloodlightConfigurationsPatchCall) Context(ctx context.Context) *FloodlightConfigurationsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightConfigurationsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightconfiguration)
@@ -19811,6 +21023,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19873,6 +21088,7 @@
profileId int64
floodlightconfiguration *FloodlightConfiguration
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing floodlight configuration.
@@ -19891,6 +21107,14 @@
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 *FloodlightConfigurationsUpdateCall) Context(ctx context.Context) *FloodlightConfigurationsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightConfigurationsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightconfiguration)
@@ -19911,6 +21135,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19966,6 +21193,7 @@
campaignId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing campaign landing page.
@@ -19985,6 +21213,14 @@
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 *LandingPagesDeleteCall) Context(ctx context.Context) *LandingPagesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LandingPagesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -20001,6 +21237,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20062,6 +21301,7 @@
campaignId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one campaign landing page by ID.
@@ -20081,6 +21321,14 @@
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 *LandingPagesGetCall) Context(ctx context.Context) *LandingPagesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LandingPagesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -20097,6 +21345,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20165,6 +21416,7 @@
campaignId int64
landingpage *LandingPage
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new landing page for the specified campaign.
@@ -20184,6 +21436,14 @@
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 *LandingPagesInsertCall) Context(ctx context.Context) *LandingPagesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LandingPagesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
@@ -20205,6 +21465,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20267,6 +21530,7 @@
profileId int64
campaignId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of landing pages for the specified campaign.
@@ -20285,6 +21549,14 @@
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 *LandingPagesListCall) Context(ctx context.Context) *LandingPagesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LandingPagesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -20300,6 +21572,9 @@
"campaignId": strconv.FormatInt(c.campaignId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20361,6 +21636,7 @@
id int64
landingpage *LandingPage
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing campaign landing page. This method
@@ -20382,6 +21658,14 @@
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 *LandingPagesPatchCall) Context(ctx context.Context) *LandingPagesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LandingPagesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
@@ -20404,6 +21688,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20475,6 +21762,7 @@
campaignId int64
landingpage *LandingPage
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing campaign landing page.
@@ -20494,6 +21782,14 @@
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 *LandingPagesUpdateCall) Context(ctx context.Context) *LandingPagesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LandingPagesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
@@ -20515,6 +21811,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20576,6 +21875,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of metros.
@@ -20593,6 +21893,14 @@
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 *MetrosListCall) Context(ctx context.Context) *MetrosListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MetrosListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -20607,6 +21915,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20657,6 +21968,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of mobile carriers.
@@ -20674,6 +21986,14 @@
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 *MobileCarriersListCall) Context(ctx context.Context) *MobileCarriersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MobileCarriersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -20688,6 +22008,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20738,6 +22061,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of operating system versions.
@@ -20755,6 +22079,14 @@
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 *OperatingSystemVersionsListCall) Context(ctx context.Context) *OperatingSystemVersionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OperatingSystemVersionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -20769,6 +22101,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20819,6 +22154,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of operating systems.
@@ -20836,6 +22172,14 @@
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 *OperatingSystemsListCall) Context(ctx context.Context) *OperatingSystemsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OperatingSystemsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -20850,6 +22194,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20901,6 +22248,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one placement group by ID.
@@ -20919,6 +22267,14 @@
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 *PlacementGroupsGetCall) Context(ctx context.Context) *PlacementGroupsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementGroupsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -20934,6 +22290,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20993,6 +22352,7 @@
profileId int64
placementgroup *PlacementGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new placement group.
@@ -21011,6 +22371,14 @@
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 *PlacementGroupsInsertCall) Context(ctx context.Context) *PlacementGroupsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
@@ -21031,6 +22399,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21084,6 +22455,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of placement groups, possibly filtered.
@@ -21241,6 +22613,14 @@
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 *PlacementGroupsListCall) Context(ctx context.Context) *PlacementGroupsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementGroupsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -21300,6 +22680,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21481,6 +22864,7 @@
id int64
placementgroup *PlacementGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing placement group. This method supports
@@ -21501,6 +22885,14 @@
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 *PlacementGroupsPatchCall) Context(ctx context.Context) *PlacementGroupsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
@@ -21522,6 +22914,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21584,6 +22979,7 @@
profileId int64
placementgroup *PlacementGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing placement group.
@@ -21602,6 +22998,14 @@
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 *PlacementGroupsUpdateCall) Context(ctx context.Context) *PlacementGroupsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
@@ -21622,6 +23026,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21676,6 +23083,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing placement strategy.
@@ -21694,6 +23102,14 @@
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 *PlacementStrategiesDeleteCall) Context(ctx context.Context) *PlacementStrategiesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementStrategiesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -21709,6 +23125,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21761,6 +23180,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one placement strategy by ID.
@@ -21779,6 +23199,14 @@
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 *PlacementStrategiesGetCall) Context(ctx context.Context) *PlacementStrategiesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementStrategiesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -21794,6 +23222,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21853,6 +23284,7 @@
profileId int64
placementstrategy *PlacementStrategy
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new placement strategy.
@@ -21871,6 +23303,14 @@
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 *PlacementStrategiesInsertCall) Context(ctx context.Context) *PlacementStrategiesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementStrategiesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
@@ -21891,6 +23331,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21944,6 +23387,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of placement strategies, possibly filtered.
@@ -22018,6 +23462,14 @@
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 *PlacementStrategiesListCall) Context(ctx context.Context) *PlacementStrategiesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementStrategiesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22050,6 +23502,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22151,6 +23606,7 @@
id int64
placementstrategy *PlacementStrategy
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing placement strategy. This method supports
@@ -22171,6 +23627,14 @@
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 *PlacementStrategiesPatchCall) Context(ctx context.Context) *PlacementStrategiesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementStrategiesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
@@ -22192,6 +23656,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22254,6 +23721,7 @@
profileId int64
placementstrategy *PlacementStrategy
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing placement strategy.
@@ -22272,6 +23740,14 @@
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 *PlacementStrategiesUpdateCall) Context(ctx context.Context) *PlacementStrategiesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementStrategiesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
@@ -22292,6 +23768,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22345,6 +23824,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Generatetags: Generates tags for a placement.
@@ -22403,6 +23883,14 @@
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 *PlacementsGeneratetagsCall) Context(ctx context.Context) *PlacementsGeneratetagsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementsGeneratetagsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22426,6 +23914,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22536,6 +24027,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one placement by ID.
@@ -22554,6 +24046,14 @@
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 *PlacementsGetCall) Context(ctx context.Context) *PlacementsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22569,6 +24069,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22628,6 +24131,7 @@
profileId int64
placement *Placement
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new placement.
@@ -22646,6 +24150,14 @@
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 *PlacementsInsertCall) Context(ctx context.Context) *PlacementsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
@@ -22666,6 +24178,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22719,6 +24234,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of placements, possibly filtered.
@@ -22903,6 +24419,14 @@
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 *PlacementsListCall) Context(ctx context.Context) *PlacementsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22971,6 +24495,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23186,6 +24713,7 @@
id int64
placement *Placement
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing placement. This method supports patch
@@ -23206,6 +24734,14 @@
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 *PlacementsPatchCall) Context(ctx context.Context) *PlacementsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
@@ -23227,6 +24763,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23289,6 +24828,7 @@
profileId int64
placement *Placement
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing placement.
@@ -23307,6 +24847,14 @@
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 *PlacementsUpdateCall) Context(ctx context.Context) *PlacementsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
@@ -23327,6 +24875,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23380,6 +24931,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of platform types.
@@ -23397,6 +24949,14 @@
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 *PlatformTypesListCall) Context(ctx context.Context) *PlatformTypesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlatformTypesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -23411,6 +24971,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23461,6 +25024,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of postal codes.
@@ -23478,6 +25042,14 @@
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 *PostalCodesListCall) Context(ctx context.Context) *PostalCodesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostalCodesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -23492,6 +25064,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23542,6 +25117,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of regions.
@@ -23559,6 +25135,14 @@
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 *RegionsListCall) Context(ctx context.Context) *RegionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -23573,6 +25157,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23624,6 +25211,7 @@
profileId int64
reportId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a report by its ID.
@@ -23642,6 +25230,14 @@
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 *ReportsDeleteCall) Context(ctx context.Context) *ReportsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -23657,6 +25253,9 @@
"reportId": strconv.FormatInt(c.reportId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23709,6 +25308,7 @@
profileId int64
reportId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a report by its ID.
@@ -23727,6 +25327,14 @@
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 *ReportsGetCall) Context(ctx context.Context) *ReportsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -23742,6 +25350,9 @@
"reportId": strconv.FormatInt(c.reportId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23801,6 +25412,7 @@
profileId int64
report *Report
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a report.
@@ -23819,6 +25431,14 @@
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 *ReportsInsertCall) Context(ctx context.Context) *ReportsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
@@ -23839,6 +25459,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23892,6 +25515,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves list of reports.
@@ -23957,6 +25581,14 @@
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 *ReportsListCall) Context(ctx context.Context) *ReportsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -23986,6 +25618,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24095,6 +25730,7 @@
reportId int64
report *Report
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a report. This method supports patch semantics.
@@ -24114,6 +25750,14 @@
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 *ReportsPatchCall) Context(ctx context.Context) *ReportsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
@@ -24135,6 +25779,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24197,6 +25844,7 @@
profileId int64
reportId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Run: Runs a report.
@@ -24222,6 +25870,14 @@
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 *ReportsRunCall) Context(ctx context.Context) *ReportsRunCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsRunCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -24240,6 +25896,9 @@
"reportId": strconv.FormatInt(c.reportId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24305,6 +25964,7 @@
reportId int64
report *Report
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a report.
@@ -24324,6 +25984,14 @@
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 *ReportsUpdateCall) Context(ctx context.Context) *ReportsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
@@ -24345,6 +26013,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24407,6 +26078,7 @@
profileId int64
report *Report
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Query: Returns the fields that are compatible to be selected in the
@@ -24427,6 +26099,14 @@
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 *ReportsCompatibleFieldsQueryCall) Context(ctx context.Context) *ReportsCompatibleFieldsQueryCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsCompatibleFieldsQueryCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
@@ -24447,6 +26127,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24502,6 +26185,7 @@
reportId int64
fileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a report file.
@@ -24521,6 +26205,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *ReportsFilesGetCall) Context(ctx context.Context) *ReportsFilesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsFilesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -24537,6 +26229,9 @@
"fileId": strconv.FormatInt(c.fileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24620,6 +26315,7 @@
profileId int64
reportId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists files for a report.
@@ -24674,6 +26370,14 @@
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 *ReportsFilesListCall) Context(ctx context.Context) *ReportsFilesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsFilesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -24701,6 +26405,9 @@
"reportId": strconv.FormatInt(c.reportId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24801,6 +26508,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one site by ID.
@@ -24819,6 +26527,14 @@
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 *SitesGetCall) Context(ctx context.Context) *SitesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SitesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -24834,6 +26550,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24893,6 +26612,7 @@
profileId int64
site *Site
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new site.
@@ -24911,6 +26631,14 @@
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 *SitesInsertCall) Context(ctx context.Context) *SitesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SitesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
@@ -24931,6 +26659,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24984,6 +26715,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of sites, possibly filtered.
@@ -25122,6 +26854,14 @@
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 *SitesListCall) Context(ctx context.Context) *SitesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SitesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -25181,6 +26921,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -25332,6 +27075,7 @@
id int64
site *Site
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing site. This method supports patch
@@ -25352,6 +27096,14 @@
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 *SitesPatchCall) Context(ctx context.Context) *SitesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SitesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
@@ -25373,6 +27125,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -25435,6 +27190,7 @@
profileId int64
site *Site
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing site.
@@ -25453,6 +27209,14 @@
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 *SitesUpdateCall) Context(ctx context.Context) *SitesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SitesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
@@ -25473,6 +27237,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -25527,6 +27294,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one size by ID.
@@ -25545,6 +27313,14 @@
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 *SizesGetCall) Context(ctx context.Context) *SizesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SizesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -25560,6 +27336,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -25619,6 +27398,7 @@
profileId int64
size *Size
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new size.
@@ -25637,6 +27417,14 @@
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 *SizesInsertCall) Context(ctx context.Context) *SizesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SizesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.size)
@@ -25657,6 +27445,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -25710,6 +27501,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of sizes, possibly filtered.
@@ -25755,6 +27547,14 @@
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 *SizesListCall) Context(ctx context.Context) *SizesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SizesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -25781,6 +27581,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -25856,6 +27659,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one subaccount by ID.
@@ -25874,6 +27678,14 @@
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 *SubaccountsGetCall) Context(ctx context.Context) *SubaccountsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubaccountsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -25889,6 +27701,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -25948,6 +27763,7 @@
profileId int64
subaccount *Subaccount
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new subaccount.
@@ -25966,6 +27782,14 @@
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 *SubaccountsInsertCall) Context(ctx context.Context) *SubaccountsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubaccountsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
@@ -25986,6 +27810,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26039,6 +27866,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Gets a list of subaccounts, possibly filtered.
@@ -26112,6 +27940,14 @@
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 *SubaccountsListCall) Context(ctx context.Context) *SubaccountsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubaccountsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -26144,6 +27980,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26245,6 +28084,7 @@
id int64
subaccount *Subaccount
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing subaccount. This method supports patch
@@ -26265,6 +28105,14 @@
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 *SubaccountsPatchCall) Context(ctx context.Context) *SubaccountsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubaccountsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
@@ -26286,6 +28134,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26348,6 +28199,7 @@
profileId int64
subaccount *Subaccount
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing subaccount.
@@ -26366,6 +28218,14 @@
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 *SubaccountsUpdateCall) Context(ctx context.Context) *SubaccountsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubaccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
@@ -26386,6 +28246,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26439,6 +28302,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one user profile by ID.
@@ -26456,6 +28320,14 @@
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 *UserProfilesGetCall) Context(ctx context.Context) *UserProfilesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserProfilesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -26470,6 +28342,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26520,6 +28395,7 @@
type UserProfilesListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves list of user profiles for a user.
@@ -26536,6 +28412,14 @@
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 *UserProfilesListCall) Context(ctx context.Context) *UserProfilesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserProfilesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -26548,6 +28432,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26588,6 +28475,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one user role permission group by ID.
@@ -26606,6 +28494,14 @@
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 *UserRolePermissionGroupsGetCall) Context(ctx context.Context) *UserRolePermissionGroupsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserRolePermissionGroupsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -26621,6 +28517,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26679,6 +28578,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Gets a list of all supported user role permission groups.
@@ -26696,6 +28596,14 @@
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 *UserRolePermissionGroupsListCall) Context(ctx context.Context) *UserRolePermissionGroupsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserRolePermissionGroupsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -26710,6 +28618,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26761,6 +28672,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one user role permission by ID.
@@ -26779,6 +28691,14 @@
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 *UserRolePermissionsGetCall) Context(ctx context.Context) *UserRolePermissionsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserRolePermissionsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -26794,6 +28714,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26852,6 +28775,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Gets a list of user role permissions, possibly filtered.
@@ -26876,6 +28800,14 @@
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 *UserRolePermissionsListCall) Context(ctx context.Context) *UserRolePermissionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserRolePermissionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -26893,6 +28825,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26951,6 +28886,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing user role.
@@ -26969,6 +28905,14 @@
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 *UserRolesDeleteCall) Context(ctx context.Context) *UserRolesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserRolesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -26984,6 +28928,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -27036,6 +28983,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one user role by ID.
@@ -27054,6 +29002,14 @@
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 *UserRolesGetCall) Context(ctx context.Context) *UserRolesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserRolesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -27069,6 +29025,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -27128,6 +29087,7 @@
profileId int64
userrole *UserRole
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new user role.
@@ -27146,6 +29106,14 @@
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 *UserRolesInsertCall) Context(ctx context.Context) *UserRolesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserRolesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
@@ -27166,6 +29134,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -27219,6 +29190,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of user roles, possibly filtered.
@@ -27307,6 +29279,14 @@
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 *UserRolesListCall) Context(ctx context.Context) *UserRolesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserRolesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -27345,6 +29325,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -27457,6 +29440,7 @@
id int64
userrole *UserRole
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing user role. This method supports patch
@@ -27477,6 +29461,14 @@
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 *UserRolesPatchCall) Context(ctx context.Context) *UserRolesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserRolesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
@@ -27498,6 +29490,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -27560,6 +29555,7 @@
profileId int64
userrole *UserRole
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing user role.
@@ -27578,6 +29574,14 @@
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 *UserRolesUpdateCall) Context(ctx context.Context) *UserRolesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserRolesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
@@ -27598,6 +29602,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/dfareporting/v2.1/dfareporting-gen.go b/dfareporting/v2.1/dfareporting-gen.go
index 8866a5e..46e6c3f 100644
--- a/dfareporting/v2.1/dfareporting-gen.go
+++ b/dfareporting/v2.1/dfareporting-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "dfareporting:v2.1"
const apiName = "dfareporting"
@@ -7329,6 +7329,7 @@
profileId int64
summaryAccountId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the account's active ad summary by account ID.
@@ -7347,6 +7348,14 @@
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 *AccountActiveAdSummariesGetCall) Context(ctx context.Context) *AccountActiveAdSummariesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountActiveAdSummariesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7362,6 +7371,9 @@
"summaryAccountId": strconv.FormatInt(c.summaryAccountId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7421,6 +7433,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one account permission group by ID.
@@ -7439,6 +7452,14 @@
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 *AccountPermissionGroupsGetCall) Context(ctx context.Context) *AccountPermissionGroupsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountPermissionGroupsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7454,6 +7475,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7512,6 +7536,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of account permission groups.
@@ -7529,6 +7554,14 @@
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 *AccountPermissionGroupsListCall) Context(ctx context.Context) *AccountPermissionGroupsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountPermissionGroupsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7543,6 +7576,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7594,6 +7630,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one account permission by ID.
@@ -7612,6 +7649,14 @@
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 *AccountPermissionsGetCall) Context(ctx context.Context) *AccountPermissionsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountPermissionsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7627,6 +7672,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7685,6 +7733,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of account permissions.
@@ -7702,6 +7751,14 @@
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 *AccountPermissionsListCall) Context(ctx context.Context) *AccountPermissionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountPermissionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7716,6 +7773,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7767,6 +7827,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one account user profile by ID.
@@ -7785,6 +7846,14 @@
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 *AccountUserProfilesGetCall) Context(ctx context.Context) *AccountUserProfilesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountUserProfilesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7800,6 +7869,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7859,6 +7931,7 @@
profileId int64
accountuserprofile *AccountUserProfile
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new account user profile.
@@ -7877,6 +7950,14 @@
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 *AccountUserProfilesInsertCall) Context(ctx context.Context) *AccountUserProfilesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountUserProfilesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
@@ -7897,6 +7978,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7950,6 +8034,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of account user profiles, possibly filtered.
@@ -8045,6 +8130,14 @@
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 *AccountUserProfilesListCall) Context(ctx context.Context) *AccountUserProfilesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountUserProfilesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8086,6 +8179,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8204,6 +8300,7 @@
id int64
accountuserprofile *AccountUserProfile
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing account user profile. This method supports
@@ -8224,6 +8321,14 @@
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 *AccountUserProfilesPatchCall) Context(ctx context.Context) *AccountUserProfilesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountUserProfilesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
@@ -8245,6 +8350,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8307,6 +8415,7 @@
profileId int64
accountuserprofile *AccountUserProfile
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing account user profile.
@@ -8325,6 +8434,14 @@
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 *AccountUserProfilesUpdateCall) Context(ctx context.Context) *AccountUserProfilesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountUserProfilesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
@@ -8345,6 +8462,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8399,6 +8519,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one account by ID.
@@ -8417,6 +8538,14 @@
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 *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8432,6 +8561,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8490,6 +8622,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of accounts, possibly filtered.
@@ -8571,6 +8704,14 @@
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 *AccountsListCall) Context(ctx context.Context) *AccountsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8606,6 +8747,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8712,6 +8856,7 @@
id int64
account *Account
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing account. This method supports patch
@@ -8732,6 +8877,14 @@
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 *AccountsPatchCall) Context(ctx context.Context) *AccountsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
@@ -8753,6 +8906,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8815,6 +8971,7 @@
profileId int64
account *Account
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing account.
@@ -8833,6 +8990,14 @@
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 *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
@@ -8853,6 +9018,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8907,6 +9075,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one ad by ID.
@@ -8925,6 +9094,14 @@
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 *AdsGetCall) Context(ctx context.Context) *AdsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8940,6 +9117,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8999,6 +9179,7 @@
profileId int64
ad *Ad
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new ad.
@@ -9017,6 +9198,14 @@
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 *AdsInsertCall) Context(ctx context.Context) *AdsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
@@ -9037,6 +9226,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9090,6 +9282,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of ads, possibly filtered.
@@ -9337,6 +9530,14 @@
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 *AdsListCall) Context(ctx context.Context) *AdsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9423,6 +9624,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9711,6 +9915,7 @@
id int64
ad *Ad
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing ad. This method supports patch semantics.
@@ -9730,6 +9935,14 @@
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 *AdsPatchCall) Context(ctx context.Context) *AdsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
@@ -9751,6 +9964,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9813,6 +10029,7 @@
profileId int64
ad *Ad
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing ad.
@@ -9831,6 +10048,14 @@
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 *AdsUpdateCall) Context(ctx context.Context) *AdsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
@@ -9851,6 +10076,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9905,6 +10133,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing advertiser group.
@@ -9923,6 +10152,14 @@
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 *AdvertiserGroupsDeleteCall) Context(ctx context.Context) *AdvertiserGroupsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertiserGroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9938,6 +10175,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9990,6 +10230,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one advertiser group by ID.
@@ -10008,6 +10249,14 @@
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 *AdvertiserGroupsGetCall) Context(ctx context.Context) *AdvertiserGroupsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertiserGroupsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10023,6 +10272,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10082,6 +10334,7 @@
profileId int64
advertisergroup *AdvertiserGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new advertiser group.
@@ -10100,6 +10353,14 @@
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 *AdvertiserGroupsInsertCall) Context(ctx context.Context) *AdvertiserGroupsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertiserGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
@@ -10120,6 +10381,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10173,6 +10437,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of advertiser groups, possibly filtered.
@@ -10247,6 +10512,14 @@
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 *AdvertiserGroupsListCall) Context(ctx context.Context) *AdvertiserGroupsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertiserGroupsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10279,6 +10552,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10380,6 +10656,7 @@
id int64
advertisergroup *AdvertiserGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing advertiser group. This method supports
@@ -10400,6 +10677,14 @@
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 *AdvertiserGroupsPatchCall) Context(ctx context.Context) *AdvertiserGroupsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertiserGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
@@ -10421,6 +10706,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10483,6 +10771,7 @@
profileId int64
advertisergroup *AdvertiserGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing advertiser group.
@@ -10501,6 +10790,14 @@
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 *AdvertiserGroupsUpdateCall) Context(ctx context.Context) *AdvertiserGroupsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertiserGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
@@ -10521,6 +10818,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10575,6 +10875,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one advertiser by ID.
@@ -10593,6 +10894,14 @@
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 *AdvertisersGetCall) Context(ctx context.Context) *AdvertisersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertisersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10608,6 +10917,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10667,6 +10979,7 @@
profileId int64
advertiser *Advertiser
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new advertiser.
@@ -10685,6 +10998,14 @@
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 *AdvertisersInsertCall) Context(ctx context.Context) *AdvertisersInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertisersInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
@@ -10705,6 +11026,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10758,6 +11082,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of advertisers, possibly filtered.
@@ -10879,6 +11204,14 @@
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 *AdvertisersListCall) Context(ctx context.Context) *AdvertisersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertisersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10929,6 +11262,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11073,6 +11409,7 @@
id int64
advertiser *Advertiser
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing advertiser. This method supports patch
@@ -11093,6 +11430,14 @@
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 *AdvertisersPatchCall) Context(ctx context.Context) *AdvertisersPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertisersPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
@@ -11114,6 +11459,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11176,6 +11524,7 @@
profileId int64
advertiser *Advertiser
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing advertiser.
@@ -11194,6 +11543,14 @@
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 *AdvertisersUpdateCall) Context(ctx context.Context) *AdvertisersUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertisersUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
@@ -11214,6 +11571,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11267,6 +11627,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of browsers.
@@ -11284,6 +11645,14 @@
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 *BrowsersListCall) Context(ctx context.Context) *BrowsersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BrowsersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -11298,6 +11667,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11350,6 +11722,7 @@
campaignId int64
campaigncreativeassociation *CampaignCreativeAssociation
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Associates a creative with the specified campaign. This
@@ -11371,6 +11744,14 @@
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 *CampaignCreativeAssociationsInsertCall) Context(ctx context.Context) *CampaignCreativeAssociationsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CampaignCreativeAssociationsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaigncreativeassociation)
@@ -11392,6 +11773,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11454,6 +11838,7 @@
profileId int64
campaignId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of creative IDs associated with the
@@ -11498,6 +11883,14 @@
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 *CampaignCreativeAssociationsListCall) Context(ctx context.Context) *CampaignCreativeAssociationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CampaignCreativeAssociationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -11522,6 +11915,9 @@
"campaignId": strconv.FormatInt(c.campaignId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11605,6 +12001,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one campaign by ID.
@@ -11623,6 +12020,14 @@
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 *CampaignsGetCall) Context(ctx context.Context) *CampaignsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CampaignsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -11638,6 +12043,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11699,6 +12107,7 @@
defaultLandingPageUrl string
campaign *Campaign
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new campaign.
@@ -11719,6 +12128,14 @@
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 *CampaignsInsertCall) Context(ctx context.Context) *CampaignsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CampaignsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
@@ -11741,6 +12158,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11808,6 +12228,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of campaigns, possibly filtered.
@@ -11934,6 +12355,14 @@
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 *CampaignsListCall) Context(ctx context.Context) *CampaignsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CampaignsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -11987,6 +12416,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12131,6 +12563,7 @@
id int64
campaign *Campaign
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing campaign. This method supports patch
@@ -12151,6 +12584,14 @@
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 *CampaignsPatchCall) Context(ctx context.Context) *CampaignsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CampaignsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
@@ -12172,6 +12613,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12234,6 +12678,7 @@
profileId int64
campaign *Campaign
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing campaign.
@@ -12252,6 +12697,14 @@
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 *CampaignsUpdateCall) Context(ctx context.Context) *CampaignsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CampaignsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
@@ -12272,6 +12725,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12326,6 +12782,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one change log by ID.
@@ -12344,6 +12801,14 @@
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 *ChangeLogsGetCall) Context(ctx context.Context) *ChangeLogsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChangeLogsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -12359,6 +12824,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12417,6 +12885,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of change logs.
@@ -12574,6 +13043,14 @@
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 *ChangeLogsListCall) Context(ctx context.Context) *ChangeLogsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChangeLogsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -12618,6 +13095,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12839,6 +13319,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of cities, possibly filtered.
@@ -12884,6 +13365,14 @@
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 *CitiesListCall) Context(ctx context.Context) *CitiesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CitiesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -12910,6 +13399,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12987,6 +13479,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one connection type by ID.
@@ -13005,6 +13498,14 @@
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 *ConnectionTypesGetCall) Context(ctx context.Context) *ConnectionTypesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ConnectionTypesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13020,6 +13521,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13078,6 +13582,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of connection types.
@@ -13095,6 +13600,14 @@
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 *ConnectionTypesListCall) Context(ctx context.Context) *ConnectionTypesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ConnectionTypesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13109,6 +13622,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13160,6 +13676,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing content category.
@@ -13178,6 +13695,14 @@
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 *ContentCategoriesDeleteCall) Context(ctx context.Context) *ContentCategoriesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ContentCategoriesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13193,6 +13718,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13245,6 +13773,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one content category by ID.
@@ -13263,6 +13792,14 @@
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 *ContentCategoriesGetCall) Context(ctx context.Context) *ContentCategoriesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ContentCategoriesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13278,6 +13815,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13337,6 +13877,7 @@
profileId int64
contentcategory *ContentCategory
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new content category.
@@ -13355,6 +13896,14 @@
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 *ContentCategoriesInsertCall) Context(ctx context.Context) *ContentCategoriesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ContentCategoriesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
@@ -13375,6 +13924,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13428,6 +13980,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of content categories, possibly filtered.
@@ -13502,6 +14055,14 @@
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 *ContentCategoriesListCall) Context(ctx context.Context) *ContentCategoriesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ContentCategoriesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13534,6 +14095,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13635,6 +14199,7 @@
id int64
contentcategory *ContentCategory
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing content category. This method supports
@@ -13655,6 +14220,14 @@
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 *ContentCategoriesPatchCall) Context(ctx context.Context) *ContentCategoriesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ContentCategoriesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
@@ -13676,6 +14249,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13738,6 +14314,7 @@
profileId int64
contentcategory *ContentCategory
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing content category.
@@ -13756,6 +14333,14 @@
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 *ContentCategoriesUpdateCall) Context(ctx context.Context) *ContentCategoriesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ContentCategoriesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
@@ -13776,6 +14361,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13830,6 +14418,7 @@
profileId int64
dartId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one country by ID.
@@ -13848,6 +14437,14 @@
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 *CountriesGetCall) Context(ctx context.Context) *CountriesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CountriesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13863,6 +14460,9 @@
"dartId": strconv.FormatInt(c.dartId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13921,6 +14521,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of countries.
@@ -13938,6 +14539,14 @@
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 *CountriesListCall) Context(ctx context.Context) *CountriesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CountriesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13952,6 +14561,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14007,8 +14619,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Insert: Inserts a new creative asset.
@@ -14028,10 +14640,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *CreativeAssetsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *CreativeAssetsInsertCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -14056,6 +14670,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *CreativeAssetsInsertCall) Context(ctx context.Context) *CreativeAssetsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeAssetsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativeassetmetadata)
@@ -14096,6 +14720,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14199,6 +14826,7 @@
creativeFieldId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing creative field value.
@@ -14218,6 +14846,14 @@
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 *CreativeFieldValuesDeleteCall) Context(ctx context.Context) *CreativeFieldValuesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldValuesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -14234,6 +14870,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14295,6 +14934,7 @@
creativeFieldId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one creative field value by ID.
@@ -14314,6 +14954,14 @@
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 *CreativeFieldValuesGetCall) Context(ctx context.Context) *CreativeFieldValuesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldValuesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -14330,6 +14978,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14398,6 +15049,7 @@
creativeFieldId int64
creativefieldvalue *CreativeFieldValue
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new creative field value.
@@ -14417,6 +15069,14 @@
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 *CreativeFieldValuesInsertCall) Context(ctx context.Context) *CreativeFieldValuesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldValuesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
@@ -14438,6 +15098,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14500,6 +15163,7 @@
profileId int64
creativeFieldId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of creative field values, possibly filtered.
@@ -14569,6 +15233,14 @@
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 *CreativeFieldValuesListCall) Context(ctx context.Context) *CreativeFieldValuesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldValuesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -14602,6 +15274,9 @@
"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14712,6 +15387,7 @@
id int64
creativefieldvalue *CreativeFieldValue
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing creative field value. This method supports
@@ -14733,6 +15409,14 @@
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 *CreativeFieldValuesPatchCall) Context(ctx context.Context) *CreativeFieldValuesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldValuesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
@@ -14755,6 +15439,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14826,6 +15513,7 @@
creativeFieldId int64
creativefieldvalue *CreativeFieldValue
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing creative field value.
@@ -14845,6 +15533,14 @@
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 *CreativeFieldValuesUpdateCall) Context(ctx context.Context) *CreativeFieldValuesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldValuesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
@@ -14866,6 +15562,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14928,6 +15627,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing creative field.
@@ -14946,6 +15646,14 @@
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 *CreativeFieldsDeleteCall) Context(ctx context.Context) *CreativeFieldsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -14961,6 +15669,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15013,6 +15724,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one creative field by ID.
@@ -15031,6 +15743,14 @@
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 *CreativeFieldsGetCall) Context(ctx context.Context) *CreativeFieldsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -15046,6 +15766,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15105,6 +15828,7 @@
profileId int64
creativefield *CreativeField
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new creative field.
@@ -15123,6 +15847,14 @@
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 *CreativeFieldsInsertCall) Context(ctx context.Context) *CreativeFieldsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
@@ -15143,6 +15875,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15196,6 +15931,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of creative fields, possibly filtered.
@@ -15277,6 +16013,14 @@
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 *CreativeFieldsListCall) Context(ctx context.Context) *CreativeFieldsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -15312,6 +16056,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15420,6 +16167,7 @@
id int64
creativefield *CreativeField
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing creative field. This method supports patch
@@ -15440,6 +16188,14 @@
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 *CreativeFieldsPatchCall) Context(ctx context.Context) *CreativeFieldsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
@@ -15461,6 +16217,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15523,6 +16282,7 @@
profileId int64
creativefield *CreativeField
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing creative field.
@@ -15541,6 +16301,14 @@
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 *CreativeFieldsUpdateCall) Context(ctx context.Context) *CreativeFieldsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
@@ -15561,6 +16329,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15615,6 +16386,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one creative group by ID.
@@ -15633,6 +16405,14 @@
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 *CreativeGroupsGetCall) Context(ctx context.Context) *CreativeGroupsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeGroupsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -15648,6 +16428,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15707,6 +16490,7 @@
profileId int64
creativegroup *CreativeGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new creative group.
@@ -15725,6 +16509,14 @@
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 *CreativeGroupsInsertCall) Context(ctx context.Context) *CreativeGroupsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
@@ -15745,6 +16537,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15798,6 +16593,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of creative groups, possibly filtered.
@@ -15886,6 +16682,14 @@
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 *CreativeGroupsListCall) Context(ctx context.Context) *CreativeGroupsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeGroupsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -15924,6 +16728,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16038,6 +16845,7 @@
id int64
creativegroup *CreativeGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing creative group. This method supports patch
@@ -16058,6 +16866,14 @@
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 *CreativeGroupsPatchCall) Context(ctx context.Context) *CreativeGroupsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
@@ -16079,6 +16895,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16141,6 +16960,7 @@
profileId int64
creativegroup *CreativeGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing creative group.
@@ -16159,6 +16979,14 @@
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 *CreativeGroupsUpdateCall) Context(ctx context.Context) *CreativeGroupsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
@@ -16179,6 +17007,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16233,6 +17064,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one creative by ID.
@@ -16251,6 +17083,14 @@
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 *CreativesGetCall) Context(ctx context.Context) *CreativesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -16266,6 +17106,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16325,6 +17168,7 @@
profileId int64
creative *Creative
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new creative.
@@ -16343,6 +17187,14 @@
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 *CreativesInsertCall) Context(ctx context.Context) *CreativesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
@@ -16363,6 +17215,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16416,6 +17271,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of creatives, possibly filtered.
@@ -16586,6 +17442,14 @@
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 *CreativesListCall) Context(ctx context.Context) *CreativesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -16648,6 +17512,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16863,6 +17730,7 @@
id int64
creative *Creative
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing creative. This method supports patch
@@ -16883,6 +17751,14 @@
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 *CreativesPatchCall) Context(ctx context.Context) *CreativesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
@@ -16904,6 +17780,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16966,6 +17845,7 @@
profileId int64
creative *Creative
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing creative.
@@ -16984,6 +17864,14 @@
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 *CreativesUpdateCall) Context(ctx context.Context) *CreativesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
@@ -17004,6 +17892,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17058,6 +17949,7 @@
profileId int64
dimensionvaluerequest *DimensionValueRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Query: Retrieves list of report dimension values for a list of
@@ -17091,6 +17983,14 @@
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 *DimensionValuesQueryCall) Context(ctx context.Context) *DimensionValuesQueryCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DimensionValuesQueryCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.dimensionvaluerequest)
@@ -17117,6 +18017,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17184,6 +18087,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one directory site contact by ID.
@@ -17202,6 +18106,14 @@
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 *DirectorySiteContactsGetCall) Context(ctx context.Context) *DirectorySiteContactsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DirectorySiteContactsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -17217,6 +18129,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17275,6 +18190,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of directory site contacts, possibly filtered.
@@ -17358,6 +18274,14 @@
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 *DirectorySiteContactsListCall) Context(ctx context.Context) *DirectorySiteContactsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DirectorySiteContactsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -17393,6 +18317,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17500,6 +18427,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one directory site by ID.
@@ -17518,6 +18446,14 @@
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 *DirectorySitesGetCall) Context(ctx context.Context) *DirectorySitesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DirectorySitesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -17533,6 +18469,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17592,6 +18531,7 @@
profileId int64
directorysite *DirectorySite
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new directory site.
@@ -17610,6 +18550,14 @@
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 *DirectorySitesInsertCall) Context(ctx context.Context) *DirectorySitesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DirectorySitesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.directorysite)
@@ -17630,6 +18578,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17683,6 +18634,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of directory sites, possibly filtered.
@@ -17810,6 +18762,14 @@
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 *DirectorySitesListCall) Context(ctx context.Context) *DirectorySitesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DirectorySitesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -17863,6 +18823,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18000,6 +18963,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing event tag.
@@ -18018,6 +18982,14 @@
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 *EventTagsDeleteCall) Context(ctx context.Context) *EventTagsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventTagsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -18033,6 +19005,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18085,6 +19060,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one event tag by ID.
@@ -18103,6 +19079,14 @@
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 *EventTagsGetCall) Context(ctx context.Context) *EventTagsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventTagsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -18118,6 +19102,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18177,6 +19164,7 @@
profileId int64
eventtag *EventTag
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new event tag.
@@ -18195,6 +19183,14 @@
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 *EventTagsInsertCall) Context(ctx context.Context) *EventTagsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventTagsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
@@ -18215,6 +19211,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18268,6 +19267,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of event tags, possibly filtered.
@@ -18389,6 +19389,14 @@
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 *EventTagsListCall) Context(ctx context.Context) *EventTagsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventTagsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -18433,6 +19441,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18567,6 +19578,7 @@
id int64
eventtag *EventTag
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing event tag. This method supports patch
@@ -18587,6 +19599,14 @@
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 *EventTagsPatchCall) Context(ctx context.Context) *EventTagsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventTagsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
@@ -18608,6 +19628,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18670,6 +19693,7 @@
profileId int64
eventtag *EventTag
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing event tag.
@@ -18688,6 +19712,14 @@
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 *EventTagsUpdateCall) Context(ctx context.Context) *EventTagsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventTagsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
@@ -18708,6 +19740,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18762,6 +19797,7 @@
reportId int64
fileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a report file by its report ID and file ID.
@@ -18780,6 +19816,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *FilesGetCall) Context(ctx context.Context) *FilesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FilesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -18795,6 +19839,9 @@
"fileId": strconv.FormatInt(c.fileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18869,6 +19916,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists files for a user profile.
@@ -18934,6 +19982,14 @@
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 *FilesListCall) Context(ctx context.Context) *FilesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FilesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -18963,6 +20019,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19071,6 +20130,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing floodlight activity.
@@ -19089,6 +20149,14 @@
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 *FloodlightActivitiesDeleteCall) Context(ctx context.Context) *FloodlightActivitiesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivitiesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -19104,6 +20172,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19155,6 +20226,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Generatetag: Generates a tag for a floodlight activity.
@@ -19180,6 +20252,14 @@
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 *FloodlightActivitiesGeneratetagCall) Context(ctx context.Context) *FloodlightActivitiesGeneratetagCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivitiesGeneratetagCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -19197,6 +20277,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19254,6 +20337,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one floodlight activity by ID.
@@ -19272,6 +20356,14 @@
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 *FloodlightActivitiesGetCall) Context(ctx context.Context) *FloodlightActivitiesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivitiesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -19287,6 +20379,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19346,6 +20441,7 @@
profileId int64
floodlightactivity *FloodlightActivity
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new floodlight activity.
@@ -19364,6 +20460,14 @@
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 *FloodlightActivitiesInsertCall) Context(ctx context.Context) *FloodlightActivitiesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivitiesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
@@ -19384,6 +20488,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19437,6 +20544,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of floodlight activities, possibly filtered.
@@ -19573,6 +20681,14 @@
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 *FloodlightActivitiesListCall) Context(ctx context.Context) *FloodlightActivitiesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivitiesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -19626,6 +20742,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19774,6 +20893,7 @@
id int64
floodlightactivity *FloodlightActivity
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing floodlight activity. This method supports
@@ -19794,6 +20914,14 @@
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 *FloodlightActivitiesPatchCall) Context(ctx context.Context) *FloodlightActivitiesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivitiesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
@@ -19815,6 +20943,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19877,6 +21008,7 @@
profileId int64
floodlightactivity *FloodlightActivity
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing floodlight activity.
@@ -19895,6 +21027,14 @@
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 *FloodlightActivitiesUpdateCall) Context(ctx context.Context) *FloodlightActivitiesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivitiesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
@@ -19915,6 +21055,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19969,6 +21112,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing floodlight activity group.
@@ -19987,6 +21131,14 @@
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 *FloodlightActivityGroupsDeleteCall) Context(ctx context.Context) *FloodlightActivityGroupsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivityGroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -20002,6 +21154,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20054,6 +21209,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one floodlight activity group by ID.
@@ -20072,6 +21228,14 @@
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 *FloodlightActivityGroupsGetCall) Context(ctx context.Context) *FloodlightActivityGroupsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivityGroupsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -20087,6 +21251,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20146,6 +21313,7 @@
profileId int64
floodlightactivitygroup *FloodlightActivityGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new floodlight activity group.
@@ -20164,6 +21332,14 @@
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 *FloodlightActivityGroupsInsertCall) Context(ctx context.Context) *FloodlightActivityGroupsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivityGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
@@ -20184,6 +21360,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20237,6 +21416,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of floodlight activity groups, possibly
@@ -20343,6 +21523,14 @@
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 *FloodlightActivityGroupsListCall) Context(ctx context.Context) *FloodlightActivityGroupsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivityGroupsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -20384,6 +21572,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20510,6 +21701,7 @@
id int64
floodlightactivitygroup *FloodlightActivityGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing floodlight activity group. This method
@@ -20530,6 +21722,14 @@
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 *FloodlightActivityGroupsPatchCall) Context(ctx context.Context) *FloodlightActivityGroupsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivityGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
@@ -20551,6 +21751,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20613,6 +21816,7 @@
profileId int64
floodlightactivitygroup *FloodlightActivityGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing floodlight activity group.
@@ -20631,6 +21835,14 @@
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 *FloodlightActivityGroupsUpdateCall) Context(ctx context.Context) *FloodlightActivityGroupsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivityGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
@@ -20651,6 +21863,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20705,6 +21920,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one floodlight configuration by ID.
@@ -20723,6 +21939,14 @@
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 *FloodlightConfigurationsGetCall) Context(ctx context.Context) *FloodlightConfigurationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightConfigurationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -20738,6 +21962,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20796,6 +22023,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of floodlight configurations, possibly
@@ -20822,6 +22050,14 @@
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 *FloodlightConfigurationsListCall) Context(ctx context.Context) *FloodlightConfigurationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightConfigurationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -20839,6 +22075,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20898,6 +22137,7 @@
id int64
floodlightconfiguration *FloodlightConfiguration
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing floodlight configuration. This method
@@ -20918,6 +22158,14 @@
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 *FloodlightConfigurationsPatchCall) Context(ctx context.Context) *FloodlightConfigurationsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightConfigurationsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightconfiguration)
@@ -20939,6 +22187,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21001,6 +22252,7 @@
profileId int64
floodlightconfiguration *FloodlightConfiguration
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing floodlight configuration.
@@ -21019,6 +22271,14 @@
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 *FloodlightConfigurationsUpdateCall) Context(ctx context.Context) *FloodlightConfigurationsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightConfigurationsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightconfiguration)
@@ -21039,6 +22299,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21094,6 +22357,7 @@
projectId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one inventory item by ID.
@@ -21113,6 +22377,14 @@
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 *InventoryItemsGetCall) Context(ctx context.Context) *InventoryItemsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InventoryItemsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -21129,6 +22401,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21196,6 +22471,7 @@
profileId int64
projectId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of inventory items, possibly filtered.
@@ -21278,6 +22554,14 @@
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 *InventoryItemsListCall) Context(ctx context.Context) *InventoryItemsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InventoryItemsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -21317,6 +22601,9 @@
"projectId": strconv.FormatInt(c.projectId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21440,6 +22727,7 @@
campaignId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing campaign landing page.
@@ -21459,6 +22747,14 @@
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 *LandingPagesDeleteCall) Context(ctx context.Context) *LandingPagesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LandingPagesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -21475,6 +22771,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21536,6 +22835,7 @@
campaignId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one campaign landing page by ID.
@@ -21555,6 +22855,14 @@
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 *LandingPagesGetCall) Context(ctx context.Context) *LandingPagesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LandingPagesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -21571,6 +22879,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21639,6 +22950,7 @@
campaignId int64
landingpage *LandingPage
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new landing page for the specified campaign.
@@ -21658,6 +22970,14 @@
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 *LandingPagesInsertCall) Context(ctx context.Context) *LandingPagesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LandingPagesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
@@ -21679,6 +22999,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21741,6 +23064,7 @@
profileId int64
campaignId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of landing pages for the specified campaign.
@@ -21759,6 +23083,14 @@
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 *LandingPagesListCall) Context(ctx context.Context) *LandingPagesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LandingPagesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -21774,6 +23106,9 @@
"campaignId": strconv.FormatInt(c.campaignId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21835,6 +23170,7 @@
id int64
landingpage *LandingPage
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing campaign landing page. This method
@@ -21856,6 +23192,14 @@
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 *LandingPagesPatchCall) Context(ctx context.Context) *LandingPagesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LandingPagesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
@@ -21878,6 +23222,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21949,6 +23296,7 @@
campaignId int64
landingpage *LandingPage
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing campaign landing page.
@@ -21968,6 +23316,14 @@
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 *LandingPagesUpdateCall) Context(ctx context.Context) *LandingPagesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LandingPagesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
@@ -21989,6 +23345,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22050,6 +23409,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of metros.
@@ -22067,6 +23427,14 @@
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 *MetrosListCall) Context(ctx context.Context) *MetrosListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MetrosListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22081,6 +23449,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22132,6 +23503,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one mobile carrier by ID.
@@ -22150,6 +23522,14 @@
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 *MobileCarriersGetCall) Context(ctx context.Context) *MobileCarriersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MobileCarriersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22165,6 +23545,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22223,6 +23606,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of mobile carriers.
@@ -22240,6 +23624,14 @@
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 *MobileCarriersListCall) Context(ctx context.Context) *MobileCarriersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MobileCarriersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22254,6 +23646,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22305,6 +23700,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one operating system version by ID.
@@ -22323,6 +23719,14 @@
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 *OperatingSystemVersionsGetCall) Context(ctx context.Context) *OperatingSystemVersionsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OperatingSystemVersionsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22338,6 +23742,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22396,6 +23803,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of operating system versions.
@@ -22413,6 +23821,14 @@
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 *OperatingSystemVersionsListCall) Context(ctx context.Context) *OperatingSystemVersionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OperatingSystemVersionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22427,6 +23843,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22478,6 +23897,7 @@
profileId int64
dartId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one operating system by DART ID.
@@ -22496,6 +23916,14 @@
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 *OperatingSystemsGetCall) Context(ctx context.Context) *OperatingSystemsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OperatingSystemsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22511,6 +23939,9 @@
"dartId": strconv.FormatInt(c.dartId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22569,6 +24000,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of operating systems.
@@ -22586,6 +24018,14 @@
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 *OperatingSystemsListCall) Context(ctx context.Context) *OperatingSystemsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OperatingSystemsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22600,6 +24040,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22652,6 +24095,7 @@
projectId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one order document by ID.
@@ -22671,6 +24115,14 @@
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 *OrderDocumentsGetCall) Context(ctx context.Context) *OrderDocumentsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrderDocumentsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22687,6 +24139,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22754,6 +24209,7 @@
profileId int64
projectId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of order documents, possibly filtered.
@@ -22850,6 +24306,14 @@
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 *OrderDocumentsListCall) Context(ctx context.Context) *OrderDocumentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrderDocumentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22892,6 +24356,9 @@
"projectId": strconv.FormatInt(c.projectId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23020,6 +24487,7 @@
projectId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one order by ID.
@@ -23039,6 +24507,14 @@
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 *OrdersGetCall) Context(ctx context.Context) *OrdersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -23055,6 +24531,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23122,6 +24601,7 @@
profileId int64
projectId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of orders, possibly filtered.
@@ -23202,6 +24682,14 @@
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 *OrdersListCall) Context(ctx context.Context) *OrdersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -23238,6 +24726,9 @@
"projectId": strconv.FormatInt(c.projectId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23353,6 +24844,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one placement group by ID.
@@ -23371,6 +24863,14 @@
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 *PlacementGroupsGetCall) Context(ctx context.Context) *PlacementGroupsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementGroupsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -23386,6 +24886,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23445,6 +24948,7 @@
profileId int64
placementgroup *PlacementGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new placement group.
@@ -23463,6 +24967,14 @@
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 *PlacementGroupsInsertCall) Context(ctx context.Context) *PlacementGroupsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
@@ -23483,6 +24995,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23536,6 +25051,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of placement groups, possibly filtered.
@@ -23693,6 +25209,14 @@
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 *PlacementGroupsListCall) Context(ctx context.Context) *PlacementGroupsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementGroupsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -23752,6 +25276,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23933,6 +25460,7 @@
id int64
placementgroup *PlacementGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing placement group. This method supports
@@ -23953,6 +25481,14 @@
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 *PlacementGroupsPatchCall) Context(ctx context.Context) *PlacementGroupsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
@@ -23974,6 +25510,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24036,6 +25575,7 @@
profileId int64
placementgroup *PlacementGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing placement group.
@@ -24054,6 +25594,14 @@
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 *PlacementGroupsUpdateCall) Context(ctx context.Context) *PlacementGroupsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
@@ -24074,6 +25622,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24128,6 +25679,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing placement strategy.
@@ -24146,6 +25698,14 @@
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 *PlacementStrategiesDeleteCall) Context(ctx context.Context) *PlacementStrategiesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementStrategiesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -24161,6 +25721,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24213,6 +25776,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one placement strategy by ID.
@@ -24231,6 +25795,14 @@
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 *PlacementStrategiesGetCall) Context(ctx context.Context) *PlacementStrategiesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementStrategiesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -24246,6 +25818,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24305,6 +25880,7 @@
profileId int64
placementstrategy *PlacementStrategy
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new placement strategy.
@@ -24323,6 +25899,14 @@
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 *PlacementStrategiesInsertCall) Context(ctx context.Context) *PlacementStrategiesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementStrategiesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
@@ -24343,6 +25927,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24396,6 +25983,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of placement strategies, possibly filtered.
@@ -24470,6 +26058,14 @@
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 *PlacementStrategiesListCall) Context(ctx context.Context) *PlacementStrategiesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementStrategiesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -24502,6 +26098,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24603,6 +26202,7 @@
id int64
placementstrategy *PlacementStrategy
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing placement strategy. This method supports
@@ -24623,6 +26223,14 @@
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 *PlacementStrategiesPatchCall) Context(ctx context.Context) *PlacementStrategiesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementStrategiesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
@@ -24644,6 +26252,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24706,6 +26317,7 @@
profileId int64
placementstrategy *PlacementStrategy
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing placement strategy.
@@ -24724,6 +26336,14 @@
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 *PlacementStrategiesUpdateCall) Context(ctx context.Context) *PlacementStrategiesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementStrategiesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
@@ -24744,6 +26364,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24797,6 +26420,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Generatetags: Generates tags for a placement.
@@ -24855,6 +26479,14 @@
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 *PlacementsGeneratetagsCall) Context(ctx context.Context) *PlacementsGeneratetagsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementsGeneratetagsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -24878,6 +26510,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24988,6 +26623,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one placement by ID.
@@ -25006,6 +26642,14 @@
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 *PlacementsGetCall) Context(ctx context.Context) *PlacementsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -25021,6 +26665,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -25080,6 +26727,7 @@
profileId int64
placement *Placement
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new placement.
@@ -25098,6 +26746,14 @@
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 *PlacementsInsertCall) Context(ctx context.Context) *PlacementsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
@@ -25118,6 +26774,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -25171,6 +26830,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of placements, possibly filtered.
@@ -25355,6 +27015,14 @@
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 *PlacementsListCall) Context(ctx context.Context) *PlacementsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -25423,6 +27091,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -25638,6 +27309,7 @@
id int64
placement *Placement
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing placement. This method supports patch
@@ -25658,6 +27330,14 @@
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 *PlacementsPatchCall) Context(ctx context.Context) *PlacementsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
@@ -25679,6 +27359,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -25741,6 +27424,7 @@
profileId int64
placement *Placement
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing placement.
@@ -25759,6 +27443,14 @@
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 *PlacementsUpdateCall) Context(ctx context.Context) *PlacementsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
@@ -25779,6 +27471,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -25833,6 +27528,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one platform type by ID.
@@ -25851,6 +27547,14 @@
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 *PlatformTypesGetCall) Context(ctx context.Context) *PlatformTypesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlatformTypesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -25866,6 +27570,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -25924,6 +27631,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of platform types.
@@ -25941,6 +27649,14 @@
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 *PlatformTypesListCall) Context(ctx context.Context) *PlatformTypesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlatformTypesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -25955,6 +27671,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26006,6 +27725,7 @@
profileId int64
code string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one postal code by ID.
@@ -26024,6 +27744,14 @@
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 *PostalCodesGetCall) Context(ctx context.Context) *PostalCodesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostalCodesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -26039,6 +27767,9 @@
"code": c.code,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26096,6 +27827,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of postal codes.
@@ -26113,6 +27845,14 @@
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 *PostalCodesListCall) Context(ctx context.Context) *PostalCodesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostalCodesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -26127,6 +27867,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26178,6 +27921,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one project by ID.
@@ -26196,6 +27940,14 @@
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 *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -26211,6 +27963,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26269,6 +28024,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of projects, possibly filtered.
@@ -26349,6 +28105,14 @@
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 *ProjectsListCall) Context(ctx context.Context) *ProjectsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -26384,6 +28148,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26490,6 +28257,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of regions.
@@ -26507,6 +28275,14 @@
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 *RegionsListCall) Context(ctx context.Context) *RegionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -26521,6 +28297,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26572,6 +28351,7 @@
profileId int64
remarketingListId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one remarketing list share by remarketing list ID.
@@ -26590,6 +28370,14 @@
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 *RemarketingListSharesGetCall) Context(ctx context.Context) *RemarketingListSharesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RemarketingListSharesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -26605,6 +28393,9 @@
"remarketingListId": strconv.FormatInt(c.remarketingListId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26665,6 +28456,7 @@
remarketingListId int64
remarketinglistshare *RemarketingListShare
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing remarketing list share. This method
@@ -26685,6 +28477,14 @@
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 *RemarketingListSharesPatchCall) Context(ctx context.Context) *RemarketingListSharesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RemarketingListSharesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglistshare)
@@ -26706,6 +28506,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26768,6 +28571,7 @@
profileId int64
remarketinglistshare *RemarketingListShare
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing remarketing list share.
@@ -26786,6 +28590,14 @@
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 *RemarketingListSharesUpdateCall) Context(ctx context.Context) *RemarketingListSharesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RemarketingListSharesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglistshare)
@@ -26806,6 +28618,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26860,6 +28675,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one remarketing list by ID.
@@ -26878,6 +28694,14 @@
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 *RemarketingListsGetCall) Context(ctx context.Context) *RemarketingListsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RemarketingListsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -26893,6 +28717,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26952,6 +28779,7 @@
profileId int64
remarketinglist *RemarketingList
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new remarketing list.
@@ -26970,6 +28798,14 @@
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 *RemarketingListsInsertCall) Context(ctx context.Context) *RemarketingListsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RemarketingListsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
@@ -26990,6 +28826,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -27044,6 +28883,7 @@
profileId int64
advertiserId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of remarketing lists, possibly filtered.
@@ -27126,6 +28966,14 @@
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 *RemarketingListsListCall) Context(ctx context.Context) *RemarketingListsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RemarketingListsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -27162,6 +29010,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -27275,6 +29126,7 @@
id int64
remarketinglist *RemarketingList
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing remarketing list. This method supports
@@ -27295,6 +29147,14 @@
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 *RemarketingListsPatchCall) Context(ctx context.Context) *RemarketingListsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RemarketingListsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
@@ -27316,6 +29176,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -27378,6 +29241,7 @@
profileId int64
remarketinglist *RemarketingList
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing remarketing list.
@@ -27396,6 +29260,14 @@
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 *RemarketingListsUpdateCall) Context(ctx context.Context) *RemarketingListsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RemarketingListsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
@@ -27416,6 +29288,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -27470,6 +29345,7 @@
profileId int64
reportId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a report by its ID.
@@ -27488,6 +29364,14 @@
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 *ReportsDeleteCall) Context(ctx context.Context) *ReportsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -27503,6 +29387,9 @@
"reportId": strconv.FormatInt(c.reportId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -27555,6 +29442,7 @@
profileId int64
reportId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a report by its ID.
@@ -27573,6 +29461,14 @@
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 *ReportsGetCall) Context(ctx context.Context) *ReportsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -27588,6 +29484,9 @@
"reportId": strconv.FormatInt(c.reportId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -27647,6 +29546,7 @@
profileId int64
report *Report
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a report.
@@ -27665,6 +29565,14 @@
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 *ReportsInsertCall) Context(ctx context.Context) *ReportsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
@@ -27685,6 +29593,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -27738,6 +29649,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves list of reports.
@@ -27803,6 +29715,14 @@
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 *ReportsListCall) Context(ctx context.Context) *ReportsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -27832,6 +29752,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -27941,6 +29864,7 @@
reportId int64
report *Report
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a report. This method supports patch semantics.
@@ -27960,6 +29884,14 @@
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 *ReportsPatchCall) Context(ctx context.Context) *ReportsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
@@ -27981,6 +29913,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -28043,6 +29978,7 @@
profileId int64
reportId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Run: Runs a report.
@@ -28068,6 +30004,14 @@
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 *ReportsRunCall) Context(ctx context.Context) *ReportsRunCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsRunCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -28086,6 +30030,9 @@
"reportId": strconv.FormatInt(c.reportId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -28151,6 +30098,7 @@
reportId int64
report *Report
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a report.
@@ -28170,6 +30118,14 @@
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 *ReportsUpdateCall) Context(ctx context.Context) *ReportsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
@@ -28191,6 +30147,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -28253,6 +30212,7 @@
profileId int64
report *Report
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Query: Returns the fields that are compatible to be selected in the
@@ -28273,6 +30233,14 @@
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 *ReportsCompatibleFieldsQueryCall) Context(ctx context.Context) *ReportsCompatibleFieldsQueryCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsCompatibleFieldsQueryCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
@@ -28293,6 +30261,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -28348,6 +30319,7 @@
reportId int64
fileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a report file.
@@ -28367,6 +30339,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *ReportsFilesGetCall) Context(ctx context.Context) *ReportsFilesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsFilesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -28383,6 +30363,9 @@
"fileId": strconv.FormatInt(c.fileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -28466,6 +30449,7 @@
profileId int64
reportId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists files for a report.
@@ -28520,6 +30504,14 @@
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 *ReportsFilesListCall) Context(ctx context.Context) *ReportsFilesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsFilesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -28547,6 +30539,9 @@
"reportId": strconv.FormatInt(c.reportId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -28647,6 +30642,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one site by ID.
@@ -28665,6 +30661,14 @@
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 *SitesGetCall) Context(ctx context.Context) *SitesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SitesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -28680,6 +30684,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -28739,6 +30746,7 @@
profileId int64
site *Site
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new site.
@@ -28757,6 +30765,14 @@
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 *SitesInsertCall) Context(ctx context.Context) *SitesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SitesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
@@ -28777,6 +30793,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -28830,6 +30849,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of sites, possibly filtered.
@@ -28968,6 +30988,14 @@
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 *SitesListCall) Context(ctx context.Context) *SitesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SitesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -29027,6 +31055,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -29178,6 +31209,7 @@
id int64
site *Site
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing site. This method supports patch
@@ -29198,6 +31230,14 @@
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 *SitesPatchCall) Context(ctx context.Context) *SitesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SitesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
@@ -29219,6 +31259,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -29281,6 +31324,7 @@
profileId int64
site *Site
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing site.
@@ -29299,6 +31343,14 @@
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 *SitesUpdateCall) Context(ctx context.Context) *SitesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SitesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
@@ -29319,6 +31371,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -29373,6 +31428,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one size by ID.
@@ -29391,6 +31447,14 @@
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 *SizesGetCall) Context(ctx context.Context) *SizesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SizesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -29406,6 +31470,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -29465,6 +31532,7 @@
profileId int64
size *Size
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new size.
@@ -29483,6 +31551,14 @@
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 *SizesInsertCall) Context(ctx context.Context) *SizesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SizesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.size)
@@ -29503,6 +31579,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -29556,6 +31635,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of sizes, possibly filtered.
@@ -29601,6 +31681,14 @@
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 *SizesListCall) Context(ctx context.Context) *SizesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SizesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -29627,6 +31715,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -29702,6 +31793,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one subaccount by ID.
@@ -29720,6 +31812,14 @@
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 *SubaccountsGetCall) Context(ctx context.Context) *SubaccountsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubaccountsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -29735,6 +31835,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -29794,6 +31897,7 @@
profileId int64
subaccount *Subaccount
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new subaccount.
@@ -29812,6 +31916,14 @@
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 *SubaccountsInsertCall) Context(ctx context.Context) *SubaccountsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubaccountsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
@@ -29832,6 +31944,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -29885,6 +32000,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Gets a list of subaccounts, possibly filtered.
@@ -29958,6 +32074,14 @@
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 *SubaccountsListCall) Context(ctx context.Context) *SubaccountsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubaccountsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -29990,6 +32114,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -30091,6 +32218,7 @@
id int64
subaccount *Subaccount
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing subaccount. This method supports patch
@@ -30111,6 +32239,14 @@
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 *SubaccountsPatchCall) Context(ctx context.Context) *SubaccountsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubaccountsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
@@ -30132,6 +32268,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -30194,6 +32333,7 @@
profileId int64
subaccount *Subaccount
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing subaccount.
@@ -30212,6 +32352,14 @@
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 *SubaccountsUpdateCall) Context(ctx context.Context) *SubaccountsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubaccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
@@ -30232,6 +32380,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -30286,6 +32437,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one remarketing list by ID.
@@ -30304,6 +32456,14 @@
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 *TargetableRemarketingListsGetCall) Context(ctx context.Context) *TargetableRemarketingListsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetableRemarketingListsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -30319,6 +32479,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -30378,6 +32541,7 @@
profileId int64
advertiserId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of targetable remarketing lists, possibly
@@ -30453,6 +32617,14 @@
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 *TargetableRemarketingListsListCall) Context(ctx context.Context) *TargetableRemarketingListsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetableRemarketingListsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -30486,6 +32658,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -30591,6 +32766,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one user profile by ID.
@@ -30608,6 +32784,14 @@
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 *UserProfilesGetCall) Context(ctx context.Context) *UserProfilesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserProfilesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -30622,6 +32806,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -30672,6 +32859,7 @@
type UserProfilesListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves list of user profiles for a user.
@@ -30688,6 +32876,14 @@
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 *UserProfilesListCall) Context(ctx context.Context) *UserProfilesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserProfilesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -30700,6 +32896,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -30740,6 +32939,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one user role permission group by ID.
@@ -30758,6 +32958,14 @@
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 *UserRolePermissionGroupsGetCall) Context(ctx context.Context) *UserRolePermissionGroupsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserRolePermissionGroupsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -30773,6 +32981,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -30831,6 +33042,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Gets a list of all supported user role permission groups.
@@ -30848,6 +33060,14 @@
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 *UserRolePermissionGroupsListCall) Context(ctx context.Context) *UserRolePermissionGroupsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserRolePermissionGroupsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -30862,6 +33082,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -30913,6 +33136,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one user role permission by ID.
@@ -30931,6 +33155,14 @@
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 *UserRolePermissionsGetCall) Context(ctx context.Context) *UserRolePermissionsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserRolePermissionsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -30946,6 +33178,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -31004,6 +33239,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Gets a list of user role permissions, possibly filtered.
@@ -31028,6 +33264,14 @@
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 *UserRolePermissionsListCall) Context(ctx context.Context) *UserRolePermissionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserRolePermissionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -31045,6 +33289,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -31103,6 +33350,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing user role.
@@ -31121,6 +33369,14 @@
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 *UserRolesDeleteCall) Context(ctx context.Context) *UserRolesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserRolesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -31136,6 +33392,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -31188,6 +33447,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one user role by ID.
@@ -31206,6 +33466,14 @@
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 *UserRolesGetCall) Context(ctx context.Context) *UserRolesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserRolesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -31221,6 +33489,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -31280,6 +33551,7 @@
profileId int64
userrole *UserRole
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new user role.
@@ -31298,6 +33570,14 @@
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 *UserRolesInsertCall) Context(ctx context.Context) *UserRolesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserRolesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
@@ -31318,6 +33598,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -31371,6 +33654,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of user roles, possibly filtered.
@@ -31459,6 +33743,14 @@
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 *UserRolesListCall) Context(ctx context.Context) *UserRolesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserRolesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -31497,6 +33789,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -31609,6 +33904,7 @@
id int64
userrole *UserRole
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing user role. This method supports patch
@@ -31629,6 +33925,14 @@
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 *UserRolesPatchCall) Context(ctx context.Context) *UserRolesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserRolesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
@@ -31650,6 +33954,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -31712,6 +34019,7 @@
profileId int64
userrole *UserRole
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing user role.
@@ -31730,6 +34038,14 @@
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 *UserRolesUpdateCall) Context(ctx context.Context) *UserRolesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserRolesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
@@ -31750,6 +34066,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/dfareporting/v2.2/dfareporting-gen.go b/dfareporting/v2.2/dfareporting-gen.go
index d0e115a..557e96c 100644
--- a/dfareporting/v2.2/dfareporting-gen.go
+++ b/dfareporting/v2.2/dfareporting-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "dfareporting:v2.2"
const apiName = "dfareporting"
@@ -7352,6 +7352,7 @@
profileId int64
summaryAccountId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the account's active ad summary by account ID.
@@ -7370,6 +7371,14 @@
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 *AccountActiveAdSummariesGetCall) Context(ctx context.Context) *AccountActiveAdSummariesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountActiveAdSummariesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7385,6 +7394,9 @@
"summaryAccountId": strconv.FormatInt(c.summaryAccountId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7444,6 +7456,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one account permission group by ID.
@@ -7462,6 +7475,14 @@
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 *AccountPermissionGroupsGetCall) Context(ctx context.Context) *AccountPermissionGroupsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountPermissionGroupsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7477,6 +7498,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7535,6 +7559,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of account permission groups.
@@ -7552,6 +7577,14 @@
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 *AccountPermissionGroupsListCall) Context(ctx context.Context) *AccountPermissionGroupsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountPermissionGroupsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7566,6 +7599,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7617,6 +7653,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one account permission by ID.
@@ -7635,6 +7672,14 @@
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 *AccountPermissionsGetCall) Context(ctx context.Context) *AccountPermissionsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountPermissionsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7650,6 +7695,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7708,6 +7756,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of account permissions.
@@ -7725,6 +7774,14 @@
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 *AccountPermissionsListCall) Context(ctx context.Context) *AccountPermissionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountPermissionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7739,6 +7796,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7790,6 +7850,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one account user profile by ID.
@@ -7808,6 +7869,14 @@
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 *AccountUserProfilesGetCall) Context(ctx context.Context) *AccountUserProfilesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountUserProfilesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7823,6 +7892,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7882,6 +7954,7 @@
profileId int64
accountuserprofile *AccountUserProfile
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new account user profile.
@@ -7900,6 +7973,14 @@
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 *AccountUserProfilesInsertCall) Context(ctx context.Context) *AccountUserProfilesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountUserProfilesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
@@ -7920,6 +8001,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7973,6 +8057,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of account user profiles, possibly filtered.
@@ -8068,6 +8153,14 @@
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 *AccountUserProfilesListCall) Context(ctx context.Context) *AccountUserProfilesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountUserProfilesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8109,6 +8202,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8227,6 +8323,7 @@
id int64
accountuserprofile *AccountUserProfile
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing account user profile. This method supports
@@ -8247,6 +8344,14 @@
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 *AccountUserProfilesPatchCall) Context(ctx context.Context) *AccountUserProfilesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountUserProfilesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
@@ -8268,6 +8373,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8330,6 +8438,7 @@
profileId int64
accountuserprofile *AccountUserProfile
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing account user profile.
@@ -8348,6 +8457,14 @@
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 *AccountUserProfilesUpdateCall) Context(ctx context.Context) *AccountUserProfilesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountUserProfilesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountuserprofile)
@@ -8368,6 +8485,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8422,6 +8542,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one account by ID.
@@ -8440,6 +8561,14 @@
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 *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8455,6 +8584,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8513,6 +8645,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of accounts, possibly filtered.
@@ -8594,6 +8727,14 @@
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 *AccountsListCall) Context(ctx context.Context) *AccountsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8629,6 +8770,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8735,6 +8879,7 @@
id int64
account *Account
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing account. This method supports patch
@@ -8755,6 +8900,14 @@
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 *AccountsPatchCall) Context(ctx context.Context) *AccountsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
@@ -8776,6 +8929,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8838,6 +8994,7 @@
profileId int64
account *Account
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing account.
@@ -8856,6 +9013,14 @@
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 *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
@@ -8876,6 +9041,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8930,6 +9098,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one ad by ID.
@@ -8948,6 +9117,14 @@
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 *AdsGetCall) Context(ctx context.Context) *AdsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8963,6 +9140,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9022,6 +9202,7 @@
profileId int64
ad *Ad
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new ad.
@@ -9040,6 +9221,14 @@
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 *AdsInsertCall) Context(ctx context.Context) *AdsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
@@ -9060,6 +9249,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9113,6 +9305,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of ads, possibly filtered.
@@ -9360,6 +9553,14 @@
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 *AdsListCall) Context(ctx context.Context) *AdsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9446,6 +9647,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9734,6 +9938,7 @@
id int64
ad *Ad
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing ad. This method supports patch semantics.
@@ -9753,6 +9958,14 @@
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 *AdsPatchCall) Context(ctx context.Context) *AdsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
@@ -9774,6 +9987,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9836,6 +10052,7 @@
profileId int64
ad *Ad
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing ad.
@@ -9854,6 +10071,14 @@
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 *AdsUpdateCall) Context(ctx context.Context) *AdsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.ad)
@@ -9874,6 +10099,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9928,6 +10156,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing advertiser group.
@@ -9946,6 +10175,14 @@
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 *AdvertiserGroupsDeleteCall) Context(ctx context.Context) *AdvertiserGroupsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertiserGroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9961,6 +10198,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10013,6 +10253,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one advertiser group by ID.
@@ -10031,6 +10272,14 @@
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 *AdvertiserGroupsGetCall) Context(ctx context.Context) *AdvertiserGroupsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertiserGroupsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10046,6 +10295,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10105,6 +10357,7 @@
profileId int64
advertisergroup *AdvertiserGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new advertiser group.
@@ -10123,6 +10376,14 @@
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 *AdvertiserGroupsInsertCall) Context(ctx context.Context) *AdvertiserGroupsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertiserGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
@@ -10143,6 +10404,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10196,6 +10460,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of advertiser groups, possibly filtered.
@@ -10270,6 +10535,14 @@
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 *AdvertiserGroupsListCall) Context(ctx context.Context) *AdvertiserGroupsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertiserGroupsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10302,6 +10575,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10403,6 +10679,7 @@
id int64
advertisergroup *AdvertiserGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing advertiser group. This method supports
@@ -10423,6 +10700,14 @@
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 *AdvertiserGroupsPatchCall) Context(ctx context.Context) *AdvertiserGroupsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertiserGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
@@ -10444,6 +10729,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10506,6 +10794,7 @@
profileId int64
advertisergroup *AdvertiserGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing advertiser group.
@@ -10524,6 +10813,14 @@
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 *AdvertiserGroupsUpdateCall) Context(ctx context.Context) *AdvertiserGroupsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertiserGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertisergroup)
@@ -10544,6 +10841,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10598,6 +10898,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one advertiser by ID.
@@ -10616,6 +10917,14 @@
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 *AdvertisersGetCall) Context(ctx context.Context) *AdvertisersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertisersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10631,6 +10940,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10690,6 +11002,7 @@
profileId int64
advertiser *Advertiser
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new advertiser.
@@ -10708,6 +11021,14 @@
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 *AdvertisersInsertCall) Context(ctx context.Context) *AdvertisersInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertisersInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
@@ -10728,6 +11049,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10781,6 +11105,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of advertisers, possibly filtered.
@@ -10902,6 +11227,14 @@
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 *AdvertisersListCall) Context(ctx context.Context) *AdvertisersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertisersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10952,6 +11285,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11096,6 +11432,7 @@
id int64
advertiser *Advertiser
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing advertiser. This method supports patch
@@ -11116,6 +11453,14 @@
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 *AdvertisersPatchCall) Context(ctx context.Context) *AdvertisersPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertisersPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
@@ -11137,6 +11482,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11199,6 +11547,7 @@
profileId int64
advertiser *Advertiser
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing advertiser.
@@ -11217,6 +11566,14 @@
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 *AdvertisersUpdateCall) Context(ctx context.Context) *AdvertisersUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertisersUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.advertiser)
@@ -11237,6 +11594,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11290,6 +11650,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of browsers.
@@ -11307,6 +11668,14 @@
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 *BrowsersListCall) Context(ctx context.Context) *BrowsersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BrowsersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -11321,6 +11690,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11373,6 +11745,7 @@
campaignId int64
campaigncreativeassociation *CampaignCreativeAssociation
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Associates a creative with the specified campaign. This
@@ -11394,6 +11767,14 @@
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 *CampaignCreativeAssociationsInsertCall) Context(ctx context.Context) *CampaignCreativeAssociationsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CampaignCreativeAssociationsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaigncreativeassociation)
@@ -11415,6 +11796,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11477,6 +11861,7 @@
profileId int64
campaignId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of creative IDs associated with the
@@ -11521,6 +11906,14 @@
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 *CampaignCreativeAssociationsListCall) Context(ctx context.Context) *CampaignCreativeAssociationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CampaignCreativeAssociationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -11545,6 +11938,9 @@
"campaignId": strconv.FormatInt(c.campaignId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11628,6 +12024,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one campaign by ID.
@@ -11646,6 +12043,14 @@
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 *CampaignsGetCall) Context(ctx context.Context) *CampaignsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CampaignsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -11661,6 +12066,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11722,6 +12130,7 @@
defaultLandingPageUrl string
campaign *Campaign
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new campaign.
@@ -11742,6 +12151,14 @@
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 *CampaignsInsertCall) Context(ctx context.Context) *CampaignsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CampaignsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
@@ -11764,6 +12181,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11831,6 +12251,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of campaigns, possibly filtered.
@@ -11957,6 +12378,14 @@
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 *CampaignsListCall) Context(ctx context.Context) *CampaignsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CampaignsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -12010,6 +12439,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12154,6 +12586,7 @@
id int64
campaign *Campaign
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing campaign. This method supports patch
@@ -12174,6 +12607,14 @@
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 *CampaignsPatchCall) Context(ctx context.Context) *CampaignsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CampaignsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
@@ -12195,6 +12636,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12257,6 +12701,7 @@
profileId int64
campaign *Campaign
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing campaign.
@@ -12275,6 +12720,14 @@
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 *CampaignsUpdateCall) Context(ctx context.Context) *CampaignsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CampaignsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.campaign)
@@ -12295,6 +12748,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12349,6 +12805,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one change log by ID.
@@ -12367,6 +12824,14 @@
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 *ChangeLogsGetCall) Context(ctx context.Context) *ChangeLogsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChangeLogsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -12382,6 +12847,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12440,6 +12908,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of change logs.
@@ -12597,6 +13066,14 @@
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 *ChangeLogsListCall) Context(ctx context.Context) *ChangeLogsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChangeLogsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -12641,6 +13118,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12862,6 +13342,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of cities, possibly filtered.
@@ -12907,6 +13388,14 @@
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 *CitiesListCall) Context(ctx context.Context) *CitiesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CitiesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -12933,6 +13422,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13010,6 +13502,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one connection type by ID.
@@ -13028,6 +13521,14 @@
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 *ConnectionTypesGetCall) Context(ctx context.Context) *ConnectionTypesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ConnectionTypesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13043,6 +13544,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13101,6 +13605,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of connection types.
@@ -13118,6 +13623,14 @@
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 *ConnectionTypesListCall) Context(ctx context.Context) *ConnectionTypesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ConnectionTypesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13132,6 +13645,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13183,6 +13699,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing content category.
@@ -13201,6 +13718,14 @@
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 *ContentCategoriesDeleteCall) Context(ctx context.Context) *ContentCategoriesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ContentCategoriesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13216,6 +13741,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13268,6 +13796,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one content category by ID.
@@ -13286,6 +13815,14 @@
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 *ContentCategoriesGetCall) Context(ctx context.Context) *ContentCategoriesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ContentCategoriesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13301,6 +13838,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13360,6 +13900,7 @@
profileId int64
contentcategory *ContentCategory
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new content category.
@@ -13378,6 +13919,14 @@
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 *ContentCategoriesInsertCall) Context(ctx context.Context) *ContentCategoriesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ContentCategoriesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
@@ -13398,6 +13947,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13451,6 +14003,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of content categories, possibly filtered.
@@ -13525,6 +14078,14 @@
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 *ContentCategoriesListCall) Context(ctx context.Context) *ContentCategoriesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ContentCategoriesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13557,6 +14118,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13658,6 +14222,7 @@
id int64
contentcategory *ContentCategory
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing content category. This method supports
@@ -13678,6 +14243,14 @@
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 *ContentCategoriesPatchCall) Context(ctx context.Context) *ContentCategoriesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ContentCategoriesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
@@ -13699,6 +14272,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13761,6 +14337,7 @@
profileId int64
contentcategory *ContentCategory
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing content category.
@@ -13779,6 +14356,14 @@
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 *ContentCategoriesUpdateCall) Context(ctx context.Context) *ContentCategoriesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ContentCategoriesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.contentcategory)
@@ -13799,6 +14384,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13853,6 +14441,7 @@
profileId int64
dartId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one country by ID.
@@ -13871,6 +14460,14 @@
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 *CountriesGetCall) Context(ctx context.Context) *CountriesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CountriesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13886,6 +14483,9 @@
"dartId": strconv.FormatInt(c.dartId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13944,6 +14544,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of countries.
@@ -13961,6 +14562,14 @@
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 *CountriesListCall) Context(ctx context.Context) *CountriesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CountriesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13975,6 +14584,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14030,8 +14642,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Insert: Inserts a new creative asset.
@@ -14051,10 +14663,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *CreativeAssetsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *CreativeAssetsInsertCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -14079,6 +14693,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *CreativeAssetsInsertCall) Context(ctx context.Context) *CreativeAssetsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeAssetsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativeassetmetadata)
@@ -14119,6 +14743,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14222,6 +14849,7 @@
creativeFieldId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing creative field value.
@@ -14241,6 +14869,14 @@
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 *CreativeFieldValuesDeleteCall) Context(ctx context.Context) *CreativeFieldValuesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldValuesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -14257,6 +14893,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14318,6 +14957,7 @@
creativeFieldId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one creative field value by ID.
@@ -14337,6 +14977,14 @@
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 *CreativeFieldValuesGetCall) Context(ctx context.Context) *CreativeFieldValuesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldValuesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -14353,6 +15001,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14421,6 +15072,7 @@
creativeFieldId int64
creativefieldvalue *CreativeFieldValue
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new creative field value.
@@ -14440,6 +15092,14 @@
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 *CreativeFieldValuesInsertCall) Context(ctx context.Context) *CreativeFieldValuesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldValuesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
@@ -14461,6 +15121,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14523,6 +15186,7 @@
profileId int64
creativeFieldId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of creative field values, possibly filtered.
@@ -14592,6 +15256,14 @@
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 *CreativeFieldValuesListCall) Context(ctx context.Context) *CreativeFieldValuesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldValuesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -14625,6 +15297,9 @@
"creativeFieldId": strconv.FormatInt(c.creativeFieldId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14735,6 +15410,7 @@
id int64
creativefieldvalue *CreativeFieldValue
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing creative field value. This method supports
@@ -14756,6 +15432,14 @@
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 *CreativeFieldValuesPatchCall) Context(ctx context.Context) *CreativeFieldValuesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldValuesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
@@ -14778,6 +15462,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14849,6 +15536,7 @@
creativeFieldId int64
creativefieldvalue *CreativeFieldValue
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing creative field value.
@@ -14868,6 +15556,14 @@
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 *CreativeFieldValuesUpdateCall) Context(ctx context.Context) *CreativeFieldValuesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldValuesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefieldvalue)
@@ -14889,6 +15585,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14951,6 +15650,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing creative field.
@@ -14969,6 +15669,14 @@
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 *CreativeFieldsDeleteCall) Context(ctx context.Context) *CreativeFieldsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -14984,6 +15692,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15036,6 +15747,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one creative field by ID.
@@ -15054,6 +15766,14 @@
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 *CreativeFieldsGetCall) Context(ctx context.Context) *CreativeFieldsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -15069,6 +15789,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15128,6 +15851,7 @@
profileId int64
creativefield *CreativeField
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new creative field.
@@ -15146,6 +15870,14 @@
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 *CreativeFieldsInsertCall) Context(ctx context.Context) *CreativeFieldsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
@@ -15166,6 +15898,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15219,6 +15954,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of creative fields, possibly filtered.
@@ -15300,6 +16036,14 @@
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 *CreativeFieldsListCall) Context(ctx context.Context) *CreativeFieldsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -15335,6 +16079,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15443,6 +16190,7 @@
id int64
creativefield *CreativeField
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing creative field. This method supports patch
@@ -15463,6 +16211,14 @@
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 *CreativeFieldsPatchCall) Context(ctx context.Context) *CreativeFieldsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
@@ -15484,6 +16240,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15546,6 +16305,7 @@
profileId int64
creativefield *CreativeField
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing creative field.
@@ -15564,6 +16324,14 @@
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 *CreativeFieldsUpdateCall) Context(ctx context.Context) *CreativeFieldsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeFieldsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativefield)
@@ -15584,6 +16352,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15638,6 +16409,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one creative group by ID.
@@ -15656,6 +16428,14 @@
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 *CreativeGroupsGetCall) Context(ctx context.Context) *CreativeGroupsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeGroupsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -15671,6 +16451,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15730,6 +16513,7 @@
profileId int64
creativegroup *CreativeGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new creative group.
@@ -15748,6 +16532,14 @@
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 *CreativeGroupsInsertCall) Context(ctx context.Context) *CreativeGroupsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
@@ -15768,6 +16560,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15821,6 +16616,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of creative groups, possibly filtered.
@@ -15909,6 +16705,14 @@
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 *CreativeGroupsListCall) Context(ctx context.Context) *CreativeGroupsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeGroupsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -15947,6 +16751,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16061,6 +16868,7 @@
id int64
creativegroup *CreativeGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing creative group. This method supports patch
@@ -16081,6 +16889,14 @@
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 *CreativeGroupsPatchCall) Context(ctx context.Context) *CreativeGroupsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
@@ -16102,6 +16918,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16164,6 +16983,7 @@
profileId int64
creativegroup *CreativeGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing creative group.
@@ -16182,6 +17002,14 @@
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 *CreativeGroupsUpdateCall) Context(ctx context.Context) *CreativeGroupsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativeGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creativegroup)
@@ -16202,6 +17030,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16256,6 +17087,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one creative by ID.
@@ -16274,6 +17106,14 @@
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 *CreativesGetCall) Context(ctx context.Context) *CreativesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -16289,6 +17129,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16348,6 +17191,7 @@
profileId int64
creative *Creative
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new creative.
@@ -16366,6 +17210,14 @@
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 *CreativesInsertCall) Context(ctx context.Context) *CreativesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
@@ -16386,6 +17238,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16439,6 +17294,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of creatives, possibly filtered.
@@ -16609,6 +17465,14 @@
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 *CreativesListCall) Context(ctx context.Context) *CreativesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -16671,6 +17535,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16886,6 +17753,7 @@
id int64
creative *Creative
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing creative. This method supports patch
@@ -16906,6 +17774,14 @@
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 *CreativesPatchCall) Context(ctx context.Context) *CreativesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
@@ -16927,6 +17803,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -16989,6 +17868,7 @@
profileId int64
creative *Creative
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing creative.
@@ -17007,6 +17887,14 @@
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 *CreativesUpdateCall) Context(ctx context.Context) *CreativesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CreativesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.creative)
@@ -17027,6 +17915,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17081,6 +17972,7 @@
profileId int64
dimensionvaluerequest *DimensionValueRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Query: Retrieves list of report dimension values for a list of
@@ -17114,6 +18006,14 @@
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 *DimensionValuesQueryCall) Context(ctx context.Context) *DimensionValuesQueryCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DimensionValuesQueryCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.dimensionvaluerequest)
@@ -17140,6 +18040,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17207,6 +18110,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one directory site contact by ID.
@@ -17225,6 +18129,14 @@
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 *DirectorySiteContactsGetCall) Context(ctx context.Context) *DirectorySiteContactsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DirectorySiteContactsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -17240,6 +18152,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17298,6 +18213,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of directory site contacts, possibly filtered.
@@ -17381,6 +18297,14 @@
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 *DirectorySiteContactsListCall) Context(ctx context.Context) *DirectorySiteContactsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DirectorySiteContactsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -17416,6 +18340,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17523,6 +18450,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one directory site by ID.
@@ -17541,6 +18469,14 @@
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 *DirectorySitesGetCall) Context(ctx context.Context) *DirectorySitesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DirectorySitesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -17556,6 +18492,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17615,6 +18554,7 @@
profileId int64
directorysite *DirectorySite
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new directory site.
@@ -17633,6 +18573,14 @@
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 *DirectorySitesInsertCall) Context(ctx context.Context) *DirectorySitesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DirectorySitesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.directorysite)
@@ -17653,6 +18601,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -17706,6 +18657,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of directory sites, possibly filtered.
@@ -17833,6 +18785,14 @@
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 *DirectorySitesListCall) Context(ctx context.Context) *DirectorySitesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DirectorySitesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -17886,6 +18846,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18023,6 +18986,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing event tag.
@@ -18041,6 +19005,14 @@
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 *EventTagsDeleteCall) Context(ctx context.Context) *EventTagsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventTagsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -18056,6 +19028,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18108,6 +19083,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one event tag by ID.
@@ -18126,6 +19102,14 @@
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 *EventTagsGetCall) Context(ctx context.Context) *EventTagsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventTagsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -18141,6 +19125,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18200,6 +19187,7 @@
profileId int64
eventtag *EventTag
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new event tag.
@@ -18218,6 +19206,14 @@
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 *EventTagsInsertCall) Context(ctx context.Context) *EventTagsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventTagsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
@@ -18238,6 +19234,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18291,6 +19290,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of event tags, possibly filtered.
@@ -18412,6 +19412,14 @@
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 *EventTagsListCall) Context(ctx context.Context) *EventTagsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventTagsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -18456,6 +19464,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18590,6 +19601,7 @@
id int64
eventtag *EventTag
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing event tag. This method supports patch
@@ -18610,6 +19622,14 @@
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 *EventTagsPatchCall) Context(ctx context.Context) *EventTagsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventTagsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
@@ -18631,6 +19651,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18693,6 +19716,7 @@
profileId int64
eventtag *EventTag
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing event tag.
@@ -18711,6 +19735,14 @@
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 *EventTagsUpdateCall) Context(ctx context.Context) *EventTagsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventTagsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventtag)
@@ -18731,6 +19763,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18785,6 +19820,7 @@
reportId int64
fileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a report file by its report ID and file ID.
@@ -18803,6 +19839,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *FilesGetCall) Context(ctx context.Context) *FilesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FilesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -18818,6 +19862,9 @@
"fileId": strconv.FormatInt(c.fileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -18892,6 +19939,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists files for a user profile.
@@ -18957,6 +20005,14 @@
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 *FilesListCall) Context(ctx context.Context) *FilesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FilesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -18986,6 +20042,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19094,6 +20153,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing floodlight activity.
@@ -19112,6 +20172,14 @@
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 *FloodlightActivitiesDeleteCall) Context(ctx context.Context) *FloodlightActivitiesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivitiesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -19127,6 +20195,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19178,6 +20249,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Generatetag: Generates a tag for a floodlight activity.
@@ -19203,6 +20275,14 @@
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 *FloodlightActivitiesGeneratetagCall) Context(ctx context.Context) *FloodlightActivitiesGeneratetagCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivitiesGeneratetagCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -19220,6 +20300,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19277,6 +20360,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one floodlight activity by ID.
@@ -19295,6 +20379,14 @@
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 *FloodlightActivitiesGetCall) Context(ctx context.Context) *FloodlightActivitiesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivitiesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -19310,6 +20402,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19369,6 +20464,7 @@
profileId int64
floodlightactivity *FloodlightActivity
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new floodlight activity.
@@ -19387,6 +20483,14 @@
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 *FloodlightActivitiesInsertCall) Context(ctx context.Context) *FloodlightActivitiesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivitiesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
@@ -19407,6 +20511,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19460,6 +20567,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of floodlight activities, possibly filtered.
@@ -19596,6 +20704,14 @@
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 *FloodlightActivitiesListCall) Context(ctx context.Context) *FloodlightActivitiesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivitiesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -19649,6 +20765,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19797,6 +20916,7 @@
id int64
floodlightactivity *FloodlightActivity
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing floodlight activity. This method supports
@@ -19817,6 +20937,14 @@
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 *FloodlightActivitiesPatchCall) Context(ctx context.Context) *FloodlightActivitiesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivitiesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
@@ -19838,6 +20966,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19900,6 +21031,7 @@
profileId int64
floodlightactivity *FloodlightActivity
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing floodlight activity.
@@ -19918,6 +21050,14 @@
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 *FloodlightActivitiesUpdateCall) Context(ctx context.Context) *FloodlightActivitiesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivitiesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivity)
@@ -19938,6 +21078,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -19992,6 +21135,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing floodlight activity group.
@@ -20010,6 +21154,14 @@
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 *FloodlightActivityGroupsDeleteCall) Context(ctx context.Context) *FloodlightActivityGroupsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivityGroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -20025,6 +21177,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20077,6 +21232,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one floodlight activity group by ID.
@@ -20095,6 +21251,14 @@
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 *FloodlightActivityGroupsGetCall) Context(ctx context.Context) *FloodlightActivityGroupsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivityGroupsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -20110,6 +21274,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20169,6 +21336,7 @@
profileId int64
floodlightactivitygroup *FloodlightActivityGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new floodlight activity group.
@@ -20187,6 +21355,14 @@
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 *FloodlightActivityGroupsInsertCall) Context(ctx context.Context) *FloodlightActivityGroupsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivityGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
@@ -20207,6 +21383,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20260,6 +21439,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of floodlight activity groups, possibly
@@ -20366,6 +21546,14 @@
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 *FloodlightActivityGroupsListCall) Context(ctx context.Context) *FloodlightActivityGroupsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivityGroupsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -20407,6 +21595,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20533,6 +21724,7 @@
id int64
floodlightactivitygroup *FloodlightActivityGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing floodlight activity group. This method
@@ -20553,6 +21745,14 @@
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 *FloodlightActivityGroupsPatchCall) Context(ctx context.Context) *FloodlightActivityGroupsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivityGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
@@ -20574,6 +21774,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20636,6 +21839,7 @@
profileId int64
floodlightactivitygroup *FloodlightActivityGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing floodlight activity group.
@@ -20654,6 +21858,14 @@
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 *FloodlightActivityGroupsUpdateCall) Context(ctx context.Context) *FloodlightActivityGroupsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightActivityGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightactivitygroup)
@@ -20674,6 +21886,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20728,6 +21943,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one floodlight configuration by ID.
@@ -20746,6 +21962,14 @@
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 *FloodlightConfigurationsGetCall) Context(ctx context.Context) *FloodlightConfigurationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightConfigurationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -20761,6 +21985,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20819,6 +22046,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of floodlight configurations, possibly
@@ -20845,6 +22073,14 @@
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 *FloodlightConfigurationsListCall) Context(ctx context.Context) *FloodlightConfigurationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightConfigurationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -20862,6 +22098,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -20921,6 +22160,7 @@
id int64
floodlightconfiguration *FloodlightConfiguration
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing floodlight configuration. This method
@@ -20941,6 +22181,14 @@
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 *FloodlightConfigurationsPatchCall) Context(ctx context.Context) *FloodlightConfigurationsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightConfigurationsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightconfiguration)
@@ -20962,6 +22210,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21024,6 +22275,7 @@
profileId int64
floodlightconfiguration *FloodlightConfiguration
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing floodlight configuration.
@@ -21042,6 +22294,14 @@
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 *FloodlightConfigurationsUpdateCall) Context(ctx context.Context) *FloodlightConfigurationsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FloodlightConfigurationsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.floodlightconfiguration)
@@ -21062,6 +22322,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21117,6 +22380,7 @@
projectId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one inventory item by ID.
@@ -21136,6 +22400,14 @@
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 *InventoryItemsGetCall) Context(ctx context.Context) *InventoryItemsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InventoryItemsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -21152,6 +22424,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21219,6 +22494,7 @@
profileId int64
projectId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of inventory items, possibly filtered.
@@ -21301,6 +22577,14 @@
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 *InventoryItemsListCall) Context(ctx context.Context) *InventoryItemsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InventoryItemsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -21340,6 +22624,9 @@
"projectId": strconv.FormatInt(c.projectId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21463,6 +22750,7 @@
campaignId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing campaign landing page.
@@ -21482,6 +22770,14 @@
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 *LandingPagesDeleteCall) Context(ctx context.Context) *LandingPagesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LandingPagesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -21498,6 +22794,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21559,6 +22858,7 @@
campaignId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one campaign landing page by ID.
@@ -21578,6 +22878,14 @@
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 *LandingPagesGetCall) Context(ctx context.Context) *LandingPagesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LandingPagesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -21594,6 +22902,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21662,6 +22973,7 @@
campaignId int64
landingpage *LandingPage
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new landing page for the specified campaign.
@@ -21681,6 +22993,14 @@
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 *LandingPagesInsertCall) Context(ctx context.Context) *LandingPagesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LandingPagesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
@@ -21702,6 +23022,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21764,6 +23087,7 @@
profileId int64
campaignId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of landing pages for the specified campaign.
@@ -21782,6 +23106,14 @@
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 *LandingPagesListCall) Context(ctx context.Context) *LandingPagesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LandingPagesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -21797,6 +23129,9 @@
"campaignId": strconv.FormatInt(c.campaignId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21858,6 +23193,7 @@
id int64
landingpage *LandingPage
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing campaign landing page. This method
@@ -21879,6 +23215,14 @@
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 *LandingPagesPatchCall) Context(ctx context.Context) *LandingPagesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LandingPagesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
@@ -21901,6 +23245,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -21972,6 +23319,7 @@
campaignId int64
landingpage *LandingPage
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing campaign landing page.
@@ -21991,6 +23339,14 @@
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 *LandingPagesUpdateCall) Context(ctx context.Context) *LandingPagesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LandingPagesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.landingpage)
@@ -22012,6 +23368,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22073,6 +23432,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of metros.
@@ -22090,6 +23450,14 @@
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 *MetrosListCall) Context(ctx context.Context) *MetrosListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MetrosListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22104,6 +23472,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22155,6 +23526,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one mobile carrier by ID.
@@ -22173,6 +23545,14 @@
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 *MobileCarriersGetCall) Context(ctx context.Context) *MobileCarriersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MobileCarriersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22188,6 +23568,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22246,6 +23629,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of mobile carriers.
@@ -22263,6 +23647,14 @@
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 *MobileCarriersListCall) Context(ctx context.Context) *MobileCarriersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MobileCarriersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22277,6 +23669,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22328,6 +23723,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one operating system version by ID.
@@ -22346,6 +23742,14 @@
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 *OperatingSystemVersionsGetCall) Context(ctx context.Context) *OperatingSystemVersionsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OperatingSystemVersionsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22361,6 +23765,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22419,6 +23826,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of operating system versions.
@@ -22436,6 +23844,14 @@
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 *OperatingSystemVersionsListCall) Context(ctx context.Context) *OperatingSystemVersionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OperatingSystemVersionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22450,6 +23866,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22501,6 +23920,7 @@
profileId int64
dartId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one operating system by DART ID.
@@ -22519,6 +23939,14 @@
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 *OperatingSystemsGetCall) Context(ctx context.Context) *OperatingSystemsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OperatingSystemsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22534,6 +23962,9 @@
"dartId": strconv.FormatInt(c.dartId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22592,6 +24023,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of operating systems.
@@ -22609,6 +24041,14 @@
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 *OperatingSystemsListCall) Context(ctx context.Context) *OperatingSystemsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OperatingSystemsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22623,6 +24063,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22675,6 +24118,7 @@
projectId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one order document by ID.
@@ -22694,6 +24138,14 @@
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 *OrderDocumentsGetCall) Context(ctx context.Context) *OrderDocumentsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrderDocumentsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22710,6 +24162,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -22777,6 +24232,7 @@
profileId int64
projectId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of order documents, possibly filtered.
@@ -22873,6 +24329,14 @@
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 *OrderDocumentsListCall) Context(ctx context.Context) *OrderDocumentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrderDocumentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -22915,6 +24379,9 @@
"projectId": strconv.FormatInt(c.projectId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23043,6 +24510,7 @@
projectId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one order by ID.
@@ -23062,6 +24530,14 @@
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 *OrdersGetCall) Context(ctx context.Context) *OrdersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -23078,6 +24554,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23145,6 +24624,7 @@
profileId int64
projectId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of orders, possibly filtered.
@@ -23225,6 +24705,14 @@
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 *OrdersListCall) Context(ctx context.Context) *OrdersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OrdersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -23261,6 +24749,9 @@
"projectId": strconv.FormatInt(c.projectId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23376,6 +24867,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one placement group by ID.
@@ -23394,6 +24886,14 @@
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 *PlacementGroupsGetCall) Context(ctx context.Context) *PlacementGroupsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementGroupsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -23409,6 +24909,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23468,6 +24971,7 @@
profileId int64
placementgroup *PlacementGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new placement group.
@@ -23486,6 +24990,14 @@
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 *PlacementGroupsInsertCall) Context(ctx context.Context) *PlacementGroupsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementGroupsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
@@ -23506,6 +25018,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -23559,6 +25074,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of placement groups, possibly filtered.
@@ -23748,6 +25264,14 @@
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 *PlacementGroupsListCall) Context(ctx context.Context) *PlacementGroupsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementGroupsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -23819,6 +25343,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24020,6 +25547,7 @@
id int64
placementgroup *PlacementGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing placement group. This method supports
@@ -24040,6 +25568,14 @@
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 *PlacementGroupsPatchCall) Context(ctx context.Context) *PlacementGroupsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
@@ -24061,6 +25597,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24123,6 +25662,7 @@
profileId int64
placementgroup *PlacementGroup
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing placement group.
@@ -24141,6 +25681,14 @@
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 *PlacementGroupsUpdateCall) Context(ctx context.Context) *PlacementGroupsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementGroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementgroup)
@@ -24161,6 +25709,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24215,6 +25766,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing placement strategy.
@@ -24233,6 +25785,14 @@
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 *PlacementStrategiesDeleteCall) Context(ctx context.Context) *PlacementStrategiesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementStrategiesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -24248,6 +25808,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24300,6 +25863,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one placement strategy by ID.
@@ -24318,6 +25882,14 @@
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 *PlacementStrategiesGetCall) Context(ctx context.Context) *PlacementStrategiesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementStrategiesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -24333,6 +25905,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24392,6 +25967,7 @@
profileId int64
placementstrategy *PlacementStrategy
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new placement strategy.
@@ -24410,6 +25986,14 @@
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 *PlacementStrategiesInsertCall) Context(ctx context.Context) *PlacementStrategiesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementStrategiesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
@@ -24430,6 +26014,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24483,6 +26070,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of placement strategies, possibly filtered.
@@ -24557,6 +26145,14 @@
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 *PlacementStrategiesListCall) Context(ctx context.Context) *PlacementStrategiesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementStrategiesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -24589,6 +26185,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24690,6 +26289,7 @@
id int64
placementstrategy *PlacementStrategy
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing placement strategy. This method supports
@@ -24710,6 +26310,14 @@
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 *PlacementStrategiesPatchCall) Context(ctx context.Context) *PlacementStrategiesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementStrategiesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
@@ -24731,6 +26339,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24793,6 +26404,7 @@
profileId int64
placementstrategy *PlacementStrategy
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing placement strategy.
@@ -24811,6 +26423,14 @@
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 *PlacementStrategiesUpdateCall) Context(ctx context.Context) *PlacementStrategiesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementStrategiesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.placementstrategy)
@@ -24831,6 +26451,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -24884,6 +26507,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Generatetags: Generates tags for a placement.
@@ -24942,6 +26566,14 @@
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 *PlacementsGeneratetagsCall) Context(ctx context.Context) *PlacementsGeneratetagsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementsGeneratetagsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -24965,6 +26597,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -25075,6 +26710,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one placement by ID.
@@ -25093,6 +26729,14 @@
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 *PlacementsGetCall) Context(ctx context.Context) *PlacementsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -25108,6 +26752,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -25167,6 +26814,7 @@
profileId int64
placement *Placement
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new placement.
@@ -25185,6 +26833,14 @@
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 *PlacementsInsertCall) Context(ctx context.Context) *PlacementsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
@@ -25205,6 +26861,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -25258,6 +26917,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of placements, possibly filtered.
@@ -25474,6 +27134,14 @@
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 *PlacementsListCall) Context(ctx context.Context) *PlacementsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -25554,6 +27222,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -25789,6 +27460,7 @@
id int64
placement *Placement
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing placement. This method supports patch
@@ -25809,6 +27481,14 @@
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 *PlacementsPatchCall) Context(ctx context.Context) *PlacementsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
@@ -25830,6 +27510,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -25892,6 +27575,7 @@
profileId int64
placement *Placement
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing placement.
@@ -25910,6 +27594,14 @@
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 *PlacementsUpdateCall) Context(ctx context.Context) *PlacementsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlacementsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.placement)
@@ -25930,6 +27622,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -25984,6 +27679,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one platform type by ID.
@@ -26002,6 +27698,14 @@
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 *PlatformTypesGetCall) Context(ctx context.Context) *PlatformTypesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlatformTypesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -26017,6 +27721,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26075,6 +27782,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of platform types.
@@ -26092,6 +27800,14 @@
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 *PlatformTypesListCall) Context(ctx context.Context) *PlatformTypesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlatformTypesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -26106,6 +27822,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26157,6 +27876,7 @@
profileId int64
code string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one postal code by ID.
@@ -26175,6 +27895,14 @@
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 *PostalCodesGetCall) Context(ctx context.Context) *PostalCodesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostalCodesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -26190,6 +27918,9 @@
"code": c.code,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26247,6 +27978,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of postal codes.
@@ -26264,6 +27996,14 @@
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 *PostalCodesListCall) Context(ctx context.Context) *PostalCodesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostalCodesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -26278,6 +28018,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26329,6 +28072,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one project by ID.
@@ -26347,6 +28091,14 @@
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 *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -26362,6 +28114,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26420,6 +28175,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of projects, possibly filtered.
@@ -26500,6 +28256,14 @@
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 *ProjectsListCall) Context(ctx context.Context) *ProjectsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -26535,6 +28299,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26641,6 +28408,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of regions.
@@ -26658,6 +28426,14 @@
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 *RegionsListCall) Context(ctx context.Context) *RegionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RegionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -26672,6 +28448,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26723,6 +28502,7 @@
profileId int64
remarketingListId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one remarketing list share by remarketing list ID.
@@ -26741,6 +28521,14 @@
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 *RemarketingListSharesGetCall) Context(ctx context.Context) *RemarketingListSharesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RemarketingListSharesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -26756,6 +28544,9 @@
"remarketingListId": strconv.FormatInt(c.remarketingListId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26816,6 +28607,7 @@
remarketingListId int64
remarketinglistshare *RemarketingListShare
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing remarketing list share. This method
@@ -26836,6 +28628,14 @@
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 *RemarketingListSharesPatchCall) Context(ctx context.Context) *RemarketingListSharesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RemarketingListSharesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglistshare)
@@ -26857,6 +28657,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -26919,6 +28722,7 @@
profileId int64
remarketinglistshare *RemarketingListShare
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing remarketing list share.
@@ -26937,6 +28741,14 @@
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 *RemarketingListSharesUpdateCall) Context(ctx context.Context) *RemarketingListSharesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RemarketingListSharesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglistshare)
@@ -26957,6 +28769,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -27011,6 +28826,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one remarketing list by ID.
@@ -27029,6 +28845,14 @@
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 *RemarketingListsGetCall) Context(ctx context.Context) *RemarketingListsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RemarketingListsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -27044,6 +28868,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -27103,6 +28930,7 @@
profileId int64
remarketinglist *RemarketingList
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new remarketing list.
@@ -27121,6 +28949,14 @@
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 *RemarketingListsInsertCall) Context(ctx context.Context) *RemarketingListsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RemarketingListsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
@@ -27141,6 +28977,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -27195,6 +29034,7 @@
profileId int64
advertiserId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of remarketing lists, possibly filtered.
@@ -27277,6 +29117,14 @@
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 *RemarketingListsListCall) Context(ctx context.Context) *RemarketingListsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RemarketingListsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -27313,6 +29161,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -27426,6 +29277,7 @@
id int64
remarketinglist *RemarketingList
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing remarketing list. This method supports
@@ -27446,6 +29298,14 @@
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 *RemarketingListsPatchCall) Context(ctx context.Context) *RemarketingListsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RemarketingListsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
@@ -27467,6 +29327,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -27529,6 +29392,7 @@
profileId int64
remarketinglist *RemarketingList
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing remarketing list.
@@ -27547,6 +29411,14 @@
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 *RemarketingListsUpdateCall) Context(ctx context.Context) *RemarketingListsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RemarketingListsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.remarketinglist)
@@ -27567,6 +29439,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -27621,6 +29496,7 @@
profileId int64
reportId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a report by its ID.
@@ -27639,6 +29515,14 @@
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 *ReportsDeleteCall) Context(ctx context.Context) *ReportsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -27654,6 +29538,9 @@
"reportId": strconv.FormatInt(c.reportId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -27706,6 +29593,7 @@
profileId int64
reportId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a report by its ID.
@@ -27724,6 +29612,14 @@
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 *ReportsGetCall) Context(ctx context.Context) *ReportsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -27739,6 +29635,9 @@
"reportId": strconv.FormatInt(c.reportId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -27798,6 +29697,7 @@
profileId int64
report *Report
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a report.
@@ -27816,6 +29716,14 @@
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 *ReportsInsertCall) Context(ctx context.Context) *ReportsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
@@ -27836,6 +29744,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -27889,6 +29800,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves list of reports.
@@ -27954,6 +29866,14 @@
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 *ReportsListCall) Context(ctx context.Context) *ReportsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -27983,6 +29903,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -28092,6 +30015,7 @@
reportId int64
report *Report
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a report. This method supports patch semantics.
@@ -28111,6 +30035,14 @@
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 *ReportsPatchCall) Context(ctx context.Context) *ReportsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
@@ -28132,6 +30064,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -28194,6 +30129,7 @@
profileId int64
reportId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Run: Runs a report.
@@ -28219,6 +30155,14 @@
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 *ReportsRunCall) Context(ctx context.Context) *ReportsRunCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsRunCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -28237,6 +30181,9 @@
"reportId": strconv.FormatInt(c.reportId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -28302,6 +30249,7 @@
reportId int64
report *Report
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a report.
@@ -28321,6 +30269,14 @@
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 *ReportsUpdateCall) Context(ctx context.Context) *ReportsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
@@ -28342,6 +30298,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -28404,6 +30363,7 @@
profileId int64
report *Report
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Query: Returns the fields that are compatible to be selected in the
@@ -28424,6 +30384,14 @@
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 *ReportsCompatibleFieldsQueryCall) Context(ctx context.Context) *ReportsCompatibleFieldsQueryCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsCompatibleFieldsQueryCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.report)
@@ -28444,6 +30412,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -28499,6 +30470,7 @@
reportId int64
fileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a report file.
@@ -28518,6 +30490,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *ReportsFilesGetCall) Context(ctx context.Context) *ReportsFilesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsFilesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -28534,6 +30514,9 @@
"fileId": strconv.FormatInt(c.fileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -28617,6 +30600,7 @@
profileId int64
reportId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists files for a report.
@@ -28671,6 +30655,14 @@
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 *ReportsFilesListCall) Context(ctx context.Context) *ReportsFilesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsFilesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -28698,6 +30690,9 @@
"reportId": strconv.FormatInt(c.reportId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -28798,6 +30793,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one site by ID.
@@ -28816,6 +30812,14 @@
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 *SitesGetCall) Context(ctx context.Context) *SitesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SitesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -28831,6 +30835,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -28890,6 +30897,7 @@
profileId int64
site *Site
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new site.
@@ -28908,6 +30916,14 @@
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 *SitesInsertCall) Context(ctx context.Context) *SitesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SitesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
@@ -28928,6 +30944,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -28981,6 +31000,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of sites, possibly filtered.
@@ -29119,6 +31139,14 @@
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 *SitesListCall) Context(ctx context.Context) *SitesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SitesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -29178,6 +31206,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -29329,6 +31360,7 @@
id int64
site *Site
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing site. This method supports patch
@@ -29349,6 +31381,14 @@
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 *SitesPatchCall) Context(ctx context.Context) *SitesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SitesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
@@ -29370,6 +31410,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -29432,6 +31475,7 @@
profileId int64
site *Site
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing site.
@@ -29450,6 +31494,14 @@
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 *SitesUpdateCall) Context(ctx context.Context) *SitesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SitesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.site)
@@ -29470,6 +31522,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -29524,6 +31579,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one size by ID.
@@ -29542,6 +31598,14 @@
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 *SizesGetCall) Context(ctx context.Context) *SizesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SizesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -29557,6 +31621,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -29616,6 +31683,7 @@
profileId int64
size *Size
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new size.
@@ -29634,6 +31702,14 @@
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 *SizesInsertCall) Context(ctx context.Context) *SizesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SizesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.size)
@@ -29654,6 +31730,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -29707,6 +31786,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of sizes, possibly filtered.
@@ -29752,6 +31832,14 @@
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 *SizesListCall) Context(ctx context.Context) *SizesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SizesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -29778,6 +31866,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -29853,6 +31944,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one subaccount by ID.
@@ -29871,6 +31963,14 @@
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 *SubaccountsGetCall) Context(ctx context.Context) *SubaccountsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubaccountsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -29886,6 +31986,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -29945,6 +32048,7 @@
profileId int64
subaccount *Subaccount
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new subaccount.
@@ -29963,6 +32067,14 @@
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 *SubaccountsInsertCall) Context(ctx context.Context) *SubaccountsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubaccountsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
@@ -29983,6 +32095,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -30036,6 +32151,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Gets a list of subaccounts, possibly filtered.
@@ -30109,6 +32225,14 @@
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 *SubaccountsListCall) Context(ctx context.Context) *SubaccountsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubaccountsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -30141,6 +32265,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -30242,6 +32369,7 @@
id int64
subaccount *Subaccount
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing subaccount. This method supports patch
@@ -30262,6 +32390,14 @@
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 *SubaccountsPatchCall) Context(ctx context.Context) *SubaccountsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubaccountsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
@@ -30283,6 +32419,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -30345,6 +32484,7 @@
profileId int64
subaccount *Subaccount
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing subaccount.
@@ -30363,6 +32503,14 @@
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 *SubaccountsUpdateCall) Context(ctx context.Context) *SubaccountsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubaccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.subaccount)
@@ -30383,6 +32531,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -30437,6 +32588,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one remarketing list by ID.
@@ -30455,6 +32607,14 @@
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 *TargetableRemarketingListsGetCall) Context(ctx context.Context) *TargetableRemarketingListsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetableRemarketingListsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -30470,6 +32630,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -30529,6 +32692,7 @@
profileId int64
advertiserId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of targetable remarketing lists, possibly
@@ -30604,6 +32768,14 @@
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 *TargetableRemarketingListsListCall) Context(ctx context.Context) *TargetableRemarketingListsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TargetableRemarketingListsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -30637,6 +32809,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -30742,6 +32917,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one user profile by ID.
@@ -30759,6 +32935,14 @@
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 *UserProfilesGetCall) Context(ctx context.Context) *UserProfilesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserProfilesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -30773,6 +32957,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -30823,6 +33010,7 @@
type UserProfilesListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves list of user profiles for a user.
@@ -30839,6 +33027,14 @@
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 *UserProfilesListCall) Context(ctx context.Context) *UserProfilesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserProfilesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -30851,6 +33047,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -30891,6 +33090,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one user role permission group by ID.
@@ -30909,6 +33109,14 @@
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 *UserRolePermissionGroupsGetCall) Context(ctx context.Context) *UserRolePermissionGroupsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserRolePermissionGroupsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -30924,6 +33132,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -30982,6 +33193,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Gets a list of all supported user role permission groups.
@@ -30999,6 +33211,14 @@
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 *UserRolePermissionGroupsListCall) Context(ctx context.Context) *UserRolePermissionGroupsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserRolePermissionGroupsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -31013,6 +33233,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -31064,6 +33287,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one user role permission by ID.
@@ -31082,6 +33306,14 @@
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 *UserRolePermissionsGetCall) Context(ctx context.Context) *UserRolePermissionsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserRolePermissionsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -31097,6 +33329,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -31155,6 +33390,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Gets a list of user role permissions, possibly filtered.
@@ -31179,6 +33415,14 @@
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 *UserRolePermissionsListCall) Context(ctx context.Context) *UserRolePermissionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserRolePermissionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -31196,6 +33440,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -31254,6 +33501,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing user role.
@@ -31272,6 +33520,14 @@
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 *UserRolesDeleteCall) Context(ctx context.Context) *UserRolesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserRolesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -31287,6 +33543,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -31339,6 +33598,7 @@
profileId int64
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one user role by ID.
@@ -31357,6 +33617,14 @@
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 *UserRolesGetCall) Context(ctx context.Context) *UserRolesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserRolesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -31372,6 +33640,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -31431,6 +33702,7 @@
profileId int64
userrole *UserRole
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new user role.
@@ -31449,6 +33721,14 @@
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 *UserRolesInsertCall) Context(ctx context.Context) *UserRolesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserRolesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
@@ -31469,6 +33749,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -31522,6 +33805,7 @@
s *Service
profileId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of user roles, possibly filtered.
@@ -31610,6 +33894,14 @@
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 *UserRolesListCall) Context(ctx context.Context) *UserRolesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserRolesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -31648,6 +33940,9 @@
"profileId": strconv.FormatInt(c.profileId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -31760,6 +34055,7 @@
id int64
userrole *UserRole
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing user role. This method supports patch
@@ -31780,6 +34076,14 @@
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 *UserRolesPatchCall) Context(ctx context.Context) *UserRolesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserRolesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
@@ -31801,6 +34105,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -31863,6 +34170,7 @@
profileId int64
userrole *UserRole
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing user role.
@@ -31881,6 +34189,14 @@
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 *UserRolesUpdateCall) Context(ctx context.Context) *UserRolesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserRolesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.userrole)
@@ -31901,6 +34217,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/discovery/v1/discovery-gen.go b/discovery/v1/discovery-gen.go
index 6ce89de..9e6e7ee 100644
--- a/discovery/v1/discovery-gen.go
+++ b/discovery/v1/discovery-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "discovery:v1"
const apiName = "discovery"
@@ -494,6 +494,7 @@
api string
version string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetRest: Retrieve the description of a particular version of an api.
@@ -512,6 +513,14 @@
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 *ApisGetRestCall) Context(ctx context.Context) *ApisGetRestCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ApisGetRestCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -527,6 +536,9 @@
"version": c.version,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -579,6 +591,7 @@
type ApisListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieve the list of APIs supported at this endpoint.
@@ -609,6 +622,14 @@
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 *ApisListCall) Context(ctx context.Context) *ApisListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ApisListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -627,6 +648,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/dns/v1/dns-gen.go b/dns/v1/dns-gen.go
index 7949bd4..c5bd9b1 100644
--- a/dns/v1/dns-gen.go
+++ b/dns/v1/dns-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "dns:v1"
const apiName = "dns"
@@ -340,6 +340,7 @@
managedZone string
change *Change
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Atomically update the ResourceRecordSet collection.
@@ -359,6 +360,14 @@
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 *ChangesCreateCall) Context(ctx context.Context) *ChangesCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChangesCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.change)
@@ -380,6 +389,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -442,6 +454,7 @@
managedZone string
changeId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Fetch the representation of an existing Change.
@@ -461,6 +474,14 @@
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 *ChangesGetCall) Context(ctx context.Context) *ChangesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChangesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -477,6 +498,9 @@
"changeId": c.changeId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -544,6 +568,7 @@
project string
managedZone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Enumerate Changes to a ResourceRecordSet collection.
@@ -595,6 +620,14 @@
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 *ChangesListCall) Context(ctx context.Context) *ChangesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChangesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -622,6 +655,9 @@
"managedZone": c.managedZone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -710,6 +746,7 @@
project string
managedzone *ManagedZone
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Create a new ManagedZone.
@@ -728,6 +765,14 @@
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 *ManagedZonesCreateCall) Context(ctx context.Context) *ManagedZonesCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagedZonesCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedzone)
@@ -748,6 +793,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -802,6 +850,7 @@
project string
managedZone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a previously created ManagedZone.
@@ -820,6 +869,14 @@
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 *ManagedZonesDeleteCall) Context(ctx context.Context) *ManagedZonesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagedZonesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -835,6 +892,9 @@
"managedZone": c.managedZone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -886,6 +946,7 @@
project string
managedZone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Fetch the representation of an existing ManagedZone.
@@ -904,6 +965,14 @@
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 *ManagedZonesGetCall) Context(ctx context.Context) *ManagedZonesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagedZonesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -919,6 +988,9 @@
"managedZone": c.managedZone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -978,6 +1050,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Enumerate ManagedZones that have been created but not yet
@@ -1019,6 +1092,14 @@
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 *ManagedZonesListCall) Context(ctx context.Context) *ManagedZonesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagedZonesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1042,6 +1123,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1110,6 +1194,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Fetch the representation of an existing Project.
@@ -1127,6 +1212,14 @@
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 *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1141,6 +1234,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1194,6 +1290,7 @@
project string
managedZone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Enumerate ResourceRecordSets that have been created but not yet
@@ -1244,6 +1341,14 @@
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 *ResourceRecordSetsListCall) Context(ctx context.Context) *ResourceRecordSetsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ResourceRecordSetsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1271,6 +1376,9 @@
"managedZone": c.managedZone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/dns/v1beta1/dns-gen.go b/dns/v1beta1/dns-gen.go
index e703daf..56671a2 100644
--- a/dns/v1beta1/dns-gen.go
+++ b/dns/v1beta1/dns-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "dns:v1beta1"
const apiName = "dns"
@@ -336,6 +336,7 @@
managedZone string
change *Change
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Atomically update the ResourceRecordSet collection.
@@ -355,6 +356,14 @@
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 *ChangesCreateCall) Context(ctx context.Context) *ChangesCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChangesCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.change)
@@ -376,6 +385,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -438,6 +450,7 @@
managedZone string
changeId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Fetch the representation of an existing Change.
@@ -457,6 +470,14 @@
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 *ChangesGetCall) Context(ctx context.Context) *ChangesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChangesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -473,6 +494,9 @@
"changeId": c.changeId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -540,6 +564,7 @@
project string
managedZone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Enumerate Changes to a ResourceRecordSet collection.
@@ -591,6 +616,14 @@
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 *ChangesListCall) Context(ctx context.Context) *ChangesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChangesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -618,6 +651,9 @@
"managedZone": c.managedZone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -706,6 +742,7 @@
project string
managedzone *ManagedZone
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Create a new ManagedZone.
@@ -724,6 +761,14 @@
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 *ManagedZonesCreateCall) Context(ctx context.Context) *ManagedZonesCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagedZonesCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.managedzone)
@@ -744,6 +789,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -798,6 +846,7 @@
project string
managedZone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a previously created ManagedZone.
@@ -816,6 +865,14 @@
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 *ManagedZonesDeleteCall) Context(ctx context.Context) *ManagedZonesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagedZonesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -831,6 +888,9 @@
"managedZone": c.managedZone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -882,6 +942,7 @@
project string
managedZone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Fetch the representation of an existing ManagedZone.
@@ -900,6 +961,14 @@
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 *ManagedZonesGetCall) Context(ctx context.Context) *ManagedZonesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagedZonesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -915,6 +984,9 @@
"managedZone": c.managedZone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -974,6 +1046,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Enumerate ManagedZones that have been created but not yet
@@ -1015,6 +1088,14 @@
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 *ManagedZonesListCall) Context(ctx context.Context) *ManagedZonesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ManagedZonesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1038,6 +1119,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1106,6 +1190,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Fetch the representation of an existing Project.
@@ -1123,6 +1208,14 @@
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 *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1137,6 +1230,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1190,6 +1286,7 @@
project string
managedZone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Enumerate ResourceRecordSets that have been created but not yet
@@ -1240,6 +1337,14 @@
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 *ResourceRecordSetsListCall) Context(ctx context.Context) *ResourceRecordSetsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ResourceRecordSetsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1267,6 +1372,9 @@
"managedZone": c.managedZone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/doubleclickbidmanager/v1/doubleclickbidmanager-gen.go b/doubleclickbidmanager/v1/doubleclickbidmanager-gen.go
index 3484ac1..ea7cf19 100644
--- a/doubleclickbidmanager/v1/doubleclickbidmanager-gen.go
+++ b/doubleclickbidmanager/v1/doubleclickbidmanager-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "doubleclickbidmanager:v1"
const apiName = "doubleclickbidmanager"
@@ -928,6 +928,7 @@
s *Service
downloadlineitemsrequest *DownloadLineItemsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Downloadlineitems: Retrieves line items in CSV format.
@@ -945,6 +946,14 @@
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 *LineitemsDownloadlineitemsCall) Context(ctx context.Context) *LineitemsDownloadlineitemsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LineitemsDownloadlineitemsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.downloadlineitemsrequest)
@@ -963,6 +972,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1001,6 +1013,7 @@
s *Service
uploadlineitemsrequest *UploadLineItemsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Uploadlineitems: Uploads line items in CSV format.
@@ -1018,6 +1031,14 @@
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 *LineitemsUploadlineitemsCall) Context(ctx context.Context) *LineitemsUploadlineitemsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LineitemsUploadlineitemsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.uploadlineitemsrequest)
@@ -1036,6 +1057,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1074,6 +1098,7 @@
s *Service
query *Query
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Createquery: Creates a query.
@@ -1091,6 +1116,14 @@
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 *QueriesCreatequeryCall) Context(ctx context.Context) *QueriesCreatequeryCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *QueriesCreatequeryCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.query)
@@ -1109,6 +1142,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1147,6 +1183,7 @@
s *Service
queryId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Deletequery: Deletes a stored query as well as the associated stored
@@ -1165,6 +1202,14 @@
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 *QueriesDeletequeryCall) Context(ctx context.Context) *QueriesDeletequeryCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *QueriesDeletequeryCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1179,6 +1224,9 @@
"queryId": strconv.FormatInt(c.queryId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1219,6 +1267,7 @@
s *Service
queryId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Getquery: Retrieves a stored query.
@@ -1236,6 +1285,14 @@
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 *QueriesGetqueryCall) Context(ctx context.Context) *QueriesGetqueryCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *QueriesGetqueryCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1250,6 +1307,9 @@
"queryId": strconv.FormatInt(c.queryId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1296,6 +1356,7 @@
type QueriesListqueriesCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Listqueries: Retrieves stored queries.
@@ -1312,6 +1373,14 @@
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 *QueriesListqueriesCall) Context(ctx context.Context) *QueriesListqueriesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *QueriesListqueriesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1324,6 +1393,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1360,6 +1432,7 @@
queryId int64
runqueryrequest *RunQueryRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Runquery: Runs a stored query to generate a report.
@@ -1378,6 +1451,14 @@
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 *QueriesRunqueryCall) Context(ctx context.Context) *QueriesRunqueryCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *QueriesRunqueryCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.runqueryrequest)
@@ -1398,6 +1479,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1441,6 +1525,7 @@
s *Service
queryId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Listreports: Retrieves stored reports.
@@ -1458,6 +1543,14 @@
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 *ReportsListreportsCall) Context(ctx context.Context) *ReportsListreportsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsListreportsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1472,6 +1565,9 @@
"queryId": strconv.FormatInt(c.queryId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/doubleclicksearch/v2/doubleclicksearch-gen.go b/doubleclicksearch/v2/doubleclicksearch-gen.go
index 49407fd..102f487 100644
--- a/doubleclicksearch/v2/doubleclicksearch-gen.go
+++ b/doubleclicksearch/v2/doubleclicksearch-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "doubleclicksearch:v2"
const apiName = "doubleclicksearch"
@@ -592,6 +592,7 @@
startDate int64
startRow int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a list of conversions from a DoubleClick Search engine
@@ -643,6 +644,14 @@
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 *ConversionGetCall) Context(ctx context.Context) *ConversionGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ConversionGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -675,6 +684,9 @@
"engineAccountId": strconv.FormatInt(c.engineAccountId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -803,6 +815,7 @@
s *Service
conversionlist *ConversionList
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a batch of new conversions into DoubleClick Search.
@@ -820,6 +833,14 @@
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 *ConversionInsertCall) Context(ctx context.Context) *ConversionInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ConversionInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.conversionlist)
@@ -838,6 +859,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -886,6 +910,7 @@
startRow int64
conversionlist *ConversionList
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a batch of conversions in DoubleClick Search. This
@@ -911,6 +936,14 @@
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 *ConversionPatchCall) Context(ctx context.Context) *ConversionPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ConversionPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.conversionlist)
@@ -936,6 +969,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1043,6 +1079,7 @@
s *Service
conversionlist *ConversionList
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a batch of conversions in DoubleClick Search.
@@ -1060,6 +1097,14 @@
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 *ConversionUpdateCall) Context(ctx context.Context) *ConversionUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ConversionUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.conversionlist)
@@ -1078,6 +1123,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1119,6 +1167,7 @@
s *Service
updateavailabilityrequest *UpdateAvailabilityRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// UpdateAvailability: Updates the availabilities of a batch of
@@ -1137,6 +1186,14 @@
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 *ConversionUpdateAvailabilityCall) Context(ctx context.Context) *ConversionUpdateAvailabilityCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ConversionUpdateAvailabilityCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.updateavailabilityrequest)
@@ -1155,6 +1212,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1197,6 +1257,7 @@
s *Service
reportrequest *ReportRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Generate: Generates and returns a report immediately.
@@ -1214,6 +1275,14 @@
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 *ReportsGenerateCall) Context(ctx context.Context) *ReportsGenerateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsGenerateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.reportrequest)
@@ -1232,6 +1301,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1274,6 +1346,7 @@
s *Service
reportId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Polls for the status of a report request.
@@ -1291,6 +1364,14 @@
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 *ReportsGetCall) Context(ctx context.Context) *ReportsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1305,6 +1386,9 @@
"reportId": c.reportId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1355,6 +1439,7 @@
reportId string
reportFragment int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetFile: Downloads a report file encoded in UTF-8.
@@ -1373,6 +1458,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *ReportsGetFileCall) Context(ctx context.Context) *ReportsGetFileCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsGetFileCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1388,6 +1481,9 @@
"reportFragment": strconv.FormatInt(c.reportFragment, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1455,6 +1551,7 @@
s *Service
reportrequest *ReportRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Request: Inserts a report request into the reporting system.
@@ -1472,6 +1569,14 @@
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 *ReportsRequestCall) Context(ctx context.Context) *ReportsRequestCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsRequestCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.reportrequest)
@@ -1490,6 +1595,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1533,6 +1641,7 @@
agencyId int64
advertiserId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieve the list of saved columns for a specified advertiser.
@@ -1551,6 +1660,14 @@
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 *SavedColumnsListCall) Context(ctx context.Context) *SavedColumnsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SavedColumnsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1566,6 +1683,9 @@
"advertiserId": strconv.FormatInt(c.advertiserId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/drive/v1/drive-gen.go b/drive/v1/drive-gen.go
index 8cba78b..4d39cf9 100644
--- a/drive/v1/drive-gen.go
+++ b/drive/v1/drive-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "drive:v1"
const apiName = "drive"
@@ -207,6 +207,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a file's metadata by id.
@@ -243,6 +244,14 @@
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 *FilesGetCall) Context(ctx context.Context) *FilesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FilesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -263,6 +272,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -334,8 +346,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Insert: Inserts a file, and any settable metadata or blob content
@@ -354,10 +366,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *FilesInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *FilesInsertCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -382,6 +396,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *FilesInsertCall) Context(ctx context.Context) *FilesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FilesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.file)
@@ -419,6 +443,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -501,6 +528,7 @@
id string
file *File
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates file metadata and/or content. This method supports
@@ -550,6 +578,14 @@
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 *FilesPatchCall) Context(ctx context.Context) *FilesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FilesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.file)
@@ -579,6 +615,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -653,8 +692,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Update: Updates file metadata and/or content
@@ -703,10 +742,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *FilesUpdateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *FilesUpdateCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -731,6 +772,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *FilesUpdateCall) Context(ctx context.Context) *FilesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FilesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.file)
@@ -779,6 +830,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/drive/v2/drive-gen.go b/drive/v2/drive-gen.go
index 1cdcbb7..35678eb 100644
--- a/drive/v2/drive-gen.go
+++ b/drive/v2/drive-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "drive:v2"
const apiName = "drive"
@@ -1481,6 +1481,7 @@
type AboutGetCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the information about the current user along with Drive API
@@ -1524,6 +1525,14 @@
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 *AboutGetCall) Context(ctx context.Context) *AboutGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AboutGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1545,6 +1554,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1610,6 +1622,7 @@
s *Service
appId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a specific app.
@@ -1627,6 +1640,14 @@
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 *AppsGetCall) Context(ctx context.Context) *AppsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AppsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1641,6 +1662,9 @@
"appId": c.appId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1695,6 +1719,7 @@
type AppsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists a user's installed apps.
@@ -1741,6 +1766,14 @@
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 *AppsListCall) Context(ctx context.Context) *AppsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AppsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1762,6 +1795,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1819,6 +1855,7 @@
s *Service
changeId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a specific change.
@@ -1836,6 +1873,14 @@
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 *ChangesGetCall) Context(ctx context.Context) *ChangesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChangesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1850,6 +1895,9 @@
"changeId": c.changeId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1905,6 +1953,7 @@
type ChangesListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the changes for a user.
@@ -1966,6 +2015,14 @@
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 *ChangesListCall) Context(ctx context.Context) *ChangesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChangesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1996,6 +2053,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2080,6 +2140,7 @@
s *Service
channel *Channel
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Watch: Subscribe to changes for a user.
@@ -2142,6 +2203,14 @@
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 *ChangesWatchCall) Context(ctx context.Context) *ChangesWatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChangesWatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
@@ -2178,6 +2247,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2266,6 +2338,7 @@
s *Service
channel *Channel
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Stop: Stop watching resources through this channel
@@ -2283,6 +2356,14 @@
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 *ChannelsStopCall) Context(ctx context.Context) *ChannelsStopCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChannelsStopCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
@@ -2301,6 +2382,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2344,6 +2428,7 @@
folderId string
childId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Removes a child from a folder.
@@ -2362,6 +2447,14 @@
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 *ChildrenDeleteCall) Context(ctx context.Context) *ChildrenDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChildrenDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2377,6 +2470,9 @@
"childId": c.childId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2428,6 +2524,7 @@
folderId string
childId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a specific child reference.
@@ -2446,6 +2543,14 @@
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 *ChildrenGetCall) Context(ctx context.Context) *ChildrenGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChildrenGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2461,6 +2566,9 @@
"childId": c.childId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2524,6 +2632,7 @@
folderId string
childreference *ChildReference
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a file into a folder.
@@ -2542,6 +2651,14 @@
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 *ChildrenInsertCall) Context(ctx context.Context) *ChildrenInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChildrenInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.childreference)
@@ -2562,6 +2679,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2616,6 +2736,7 @@
s *Service
folderId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists a folder's children.
@@ -2668,6 +2789,14 @@
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 *ChildrenListCall) Context(ctx context.Context) *ChildrenListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChildrenListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2694,6 +2823,9 @@
"folderId": c.folderId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2773,6 +2905,7 @@
fileId string
commentId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a comment.
@@ -2791,6 +2924,14 @@
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 *CommentsDeleteCall) Context(ctx context.Context) *CommentsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2806,6 +2947,9 @@
"commentId": c.commentId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2857,6 +3001,7 @@
fileId string
commentId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a comment by ID.
@@ -2883,6 +3028,14 @@
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 *CommentsGetCall) Context(ctx context.Context) *CommentsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2901,6 +3054,9 @@
"commentId": c.commentId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2966,6 +3122,7 @@
fileId string
comment *Comment
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a new comment on the given file.
@@ -2984,6 +3141,14 @@
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 *CommentsInsertCall) Context(ctx context.Context) *CommentsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.comment)
@@ -3004,6 +3169,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3057,6 +3225,7 @@
s *Service
fileId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists a file's comments.
@@ -3106,6 +3275,14 @@
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 *CommentsListCall) Context(ctx context.Context) *CommentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3132,6 +3309,9 @@
"fileId": c.fileId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3210,6 +3390,7 @@
commentId string
comment *Comment
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing comment. This method supports patch
@@ -3230,6 +3411,14 @@
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 *CommentsPatchCall) Context(ctx context.Context) *CommentsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.comment)
@@ -3251,6 +3440,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3313,6 +3505,7 @@
commentId string
comment *Comment
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing comment.
@@ -3332,6 +3525,14 @@
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 *CommentsUpdateCall) Context(ctx context.Context) *CommentsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.comment)
@@ -3353,6 +3554,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3414,6 +3618,7 @@
fileId string
file *File
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Copy: Creates a copy of the specified file.
@@ -3488,6 +3693,14 @@
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 *FilesCopyCall) Context(ctx context.Context) *FilesCopyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FilesCopyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.file)
@@ -3529,6 +3742,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3632,6 +3848,7 @@
s *Service
fileId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Permanently deletes a file by ID. Skips the trash. The
@@ -3650,6 +3867,14 @@
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 *FilesDeleteCall) Context(ctx context.Context) *FilesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FilesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3664,6 +3889,9 @@
"fileId": c.fileId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3707,6 +3935,7 @@
type FilesEmptyTrashCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// EmptyTrash: Permanently deletes all of the user's trashed files.
@@ -3723,6 +3952,14 @@
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 *FilesEmptyTrashCall) Context(ctx context.Context) *FilesEmptyTrashCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FilesEmptyTrashCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3735,6 +3972,9 @@
req, _ := http.NewRequest("DELETE", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3765,6 +4005,7 @@
type FilesGenerateIdsCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GenerateIds: Generates a set of file IDs which can be provided in
@@ -3797,6 +4038,14 @@
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 *FilesGenerateIdsCall) Context(ctx context.Context) *FilesGenerateIdsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FilesGenerateIdsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3815,6 +4064,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3872,6 +4124,7 @@
s *Service
fileId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a file's metadata by ID.
@@ -3924,6 +4177,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *FilesGetCall) Context(ctx context.Context) *FilesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FilesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3950,6 +4211,9 @@
"fileId": c.fileId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4056,8 +4320,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Insert: Insert a new file.
@@ -4138,10 +4402,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *FilesInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *FilesInsertCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -4166,6 +4432,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *FilesInsertCall) Context(ctx context.Context) *FilesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FilesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.file)
@@ -4227,6 +4503,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4366,6 +4645,7 @@
type FilesListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the user's files.
@@ -4446,6 +4726,14 @@
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 *FilesListCall) Context(ctx context.Context) *FilesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FilesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4479,6 +4767,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4581,6 +4872,7 @@
fileId string
file *File
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates file metadata and/or content. This method supports
@@ -4711,6 +5003,14 @@
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 *FilesPatchCall) Context(ctx context.Context) *FilesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FilesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.file)
@@ -4770,6 +5070,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4915,6 +5218,7 @@
s *Service
fileId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Touch: Set the file's updated time to the current server time.
@@ -4932,6 +5236,14 @@
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 *FilesTouchCall) Context(ctx context.Context) *FilesTouchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FilesTouchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4946,6 +5258,9 @@
"fileId": c.fileId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4999,6 +5314,7 @@
s *Service
fileId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Trash: Moves a file to the trash. The currently authenticated user
@@ -5017,6 +5333,14 @@
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 *FilesTrashCall) Context(ctx context.Context) *FilesTrashCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FilesTrashCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5031,6 +5355,9 @@
"fileId": c.fileId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5083,6 +5410,7 @@
s *Service
fileId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Untrash: Restores a file from the trash.
@@ -5100,6 +5428,14 @@
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 *FilesUntrashCall) Context(ctx context.Context) *FilesUntrashCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FilesUntrashCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5114,6 +5450,9 @@
"fileId": c.fileId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5170,8 +5509,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Update: Updates file metadata and/or content.
@@ -5301,10 +5640,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *FilesUpdateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *FilesUpdateCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -5329,6 +5670,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *FilesUpdateCall) Context(ctx context.Context) *FilesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FilesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.file)
@@ -5407,6 +5758,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5593,6 +5947,7 @@
fileId string
channel *Channel
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Watch: Subscribe to changes on a file
@@ -5646,6 +6001,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *FilesWatchCall) Context(ctx context.Context) *FilesWatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FilesWatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
@@ -5678,6 +6041,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5786,6 +6152,7 @@
fileId string
parentId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Removes a parent from a file.
@@ -5804,6 +6171,14 @@
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 *ParentsDeleteCall) Context(ctx context.Context) *ParentsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ParentsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5819,6 +6194,9 @@
"parentId": c.parentId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5870,6 +6248,7 @@
fileId string
parentId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a specific parent reference.
@@ -5888,6 +6267,14 @@
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 *ParentsGetCall) Context(ctx context.Context) *ParentsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ParentsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5903,6 +6290,9 @@
"parentId": c.parentId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5966,6 +6356,7 @@
fileId string
parentreference *ParentReference
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Adds a parent folder for a file.
@@ -5984,6 +6375,14 @@
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 *ParentsInsertCall) Context(ctx context.Context) *ParentsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ParentsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.parentreference)
@@ -6004,6 +6403,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6058,6 +6460,7 @@
s *Service
fileId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists a file's parents.
@@ -6075,6 +6478,14 @@
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 *ParentsListCall) Context(ctx context.Context) *ParentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ParentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6089,6 +6500,9 @@
"fileId": c.fileId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6145,6 +6559,7 @@
fileId string
permissionId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a permission from a file.
@@ -6163,6 +6578,14 @@
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 *PermissionsDeleteCall) Context(ctx context.Context) *PermissionsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PermissionsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6178,6 +6601,9 @@
"permissionId": c.permissionId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6229,6 +6655,7 @@
fileId string
permissionId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a permission by ID.
@@ -6247,6 +6674,14 @@
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 *PermissionsGetCall) Context(ctx context.Context) *PermissionsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PermissionsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6262,6 +6697,9 @@
"permissionId": c.permissionId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6323,6 +6761,7 @@
s *Service
email string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetIdForEmail: Returns the permission ID for an email address.
@@ -6340,6 +6779,14 @@
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 *PermissionsGetIdForEmailCall) Context(ctx context.Context) *PermissionsGetIdForEmailCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PermissionsGetIdForEmailCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6354,6 +6801,9 @@
"email": c.email,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6411,6 +6861,7 @@
fileId string
permission *Permission
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a permission for a file.
@@ -6445,6 +6896,14 @@
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 *PermissionsInsertCall) Context(ctx context.Context) *PermissionsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PermissionsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.permission)
@@ -6471,6 +6930,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6535,6 +6997,7 @@
s *Service
fileId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists a file's permissions.
@@ -6552,6 +7015,14 @@
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 *PermissionsListCall) Context(ctx context.Context) *PermissionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PermissionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6566,6 +7037,9 @@
"fileId": c.fileId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6622,6 +7096,7 @@
permissionId string
permission *Permission
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a permission using patch semantics.
@@ -6649,6 +7124,14 @@
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 *PermissionsPatchCall) Context(ctx context.Context) *PermissionsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PermissionsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.permission)
@@ -6673,6 +7156,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6741,6 +7227,7 @@
permissionId string
permission *Permission
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a permission.
@@ -6768,6 +7255,14 @@
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 *PermissionsUpdateCall) Context(ctx context.Context) *PermissionsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PermissionsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.permission)
@@ -6792,6 +7287,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6859,6 +7357,7 @@
fileId string
propertyKey string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a property.
@@ -6884,6 +7383,14 @@
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 *PropertiesDeleteCall) Context(ctx context.Context) *PropertiesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PropertiesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6902,6 +7409,9 @@
"propertyKey": c.propertyKey,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6961,6 +7471,7 @@
fileId string
propertyKey string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a property by its key.
@@ -6986,6 +7497,14 @@
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 *PropertiesGetCall) Context(ctx context.Context) *PropertiesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PropertiesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7004,6 +7523,9 @@
"propertyKey": c.propertyKey,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7073,6 +7595,7 @@
fileId string
property *Property
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Adds a property to a file.
@@ -7091,6 +7614,14 @@
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 *PropertiesInsertCall) Context(ctx context.Context) *PropertiesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PropertiesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.property)
@@ -7111,6 +7642,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7166,6 +7700,7 @@
s *Service
fileId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists a file's properties.
@@ -7183,6 +7718,14 @@
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 *PropertiesListCall) Context(ctx context.Context) *PropertiesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PropertiesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7197,6 +7740,9 @@
"fileId": c.fileId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7254,6 +7800,7 @@
propertyKey string
property *Property
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a property. This method supports patch semantics.
@@ -7280,6 +7827,14 @@
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 *PropertiesPatchCall) Context(ctx context.Context) *PropertiesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PropertiesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.property)
@@ -7304,6 +7859,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7374,6 +7932,7 @@
propertyKey string
property *Property
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a property.
@@ -7400,6 +7959,14 @@
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 *PropertiesUpdateCall) Context(ctx context.Context) *PropertiesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PropertiesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.property)
@@ -7424,6 +7991,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7492,6 +8062,7 @@
s *Service
fileId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Exports the contents of the Realtime API data model associated
@@ -7519,6 +8090,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *RealtimeGetCall) Context(ctx context.Context) *RealtimeGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RealtimeGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7536,6 +8115,9 @@
"fileId": c.fileId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7606,8 +8188,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Update: Overwrites the Realtime API data model associated with this
@@ -7637,10 +8219,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *RealtimeUpdateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *RealtimeUpdateCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -7665,6 +8249,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *RealtimeUpdateCall) Context(ctx context.Context) *RealtimeUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RealtimeUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7704,6 +8298,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7794,6 +8391,7 @@
commentId string
replyId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a reply.
@@ -7813,6 +8411,14 @@
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 *RepliesDeleteCall) Context(ctx context.Context) *RepliesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RepliesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7829,6 +8435,9 @@
"replyId": c.replyId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7888,6 +8497,7 @@
commentId string
replyId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a reply.
@@ -7914,6 +8524,14 @@
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 *RepliesGetCall) Context(ctx context.Context) *RepliesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RepliesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7933,6 +8551,9 @@
"replyId": c.replyId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8006,6 +8627,7 @@
commentId string
commentreply *CommentReply
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a new reply to the given comment.
@@ -8025,6 +8647,14 @@
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 *RepliesInsertCall) Context(ctx context.Context) *RepliesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RepliesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.commentreply)
@@ -8046,6 +8676,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8107,6 +8740,7 @@
fileId string
commentId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all of the replies to a comment.
@@ -8149,6 +8783,14 @@
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 *RepliesListCall) Context(ctx context.Context) *RepliesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RepliesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8173,6 +8815,9 @@
"commentId": c.commentId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8254,6 +8899,7 @@
replyId string
commentreply *CommentReply
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing reply. This method supports patch
@@ -8275,6 +8921,14 @@
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 *RepliesPatchCall) Context(ctx context.Context) *RepliesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RepliesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.commentreply)
@@ -8297,6 +8951,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8367,6 +9024,7 @@
replyId string
commentreply *CommentReply
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing reply.
@@ -8387,6 +9045,14 @@
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 *RepliesUpdateCall) Context(ctx context.Context) *RepliesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RepliesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.commentreply)
@@ -8409,6 +9075,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8477,6 +9146,7 @@
fileId string
revisionId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Removes a revision.
@@ -8495,6 +9165,14 @@
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 *RevisionsDeleteCall) Context(ctx context.Context) *RevisionsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RevisionsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8510,6 +9188,9 @@
"revisionId": c.revisionId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8562,6 +9243,7 @@
fileId string
revisionId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a specific revision.
@@ -8580,6 +9262,14 @@
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 *RevisionsGetCall) Context(ctx context.Context) *RevisionsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RevisionsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8595,6 +9285,9 @@
"revisionId": c.revisionId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8657,6 +9350,7 @@
s *Service
fileId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists a file's revisions.
@@ -8674,6 +9368,14 @@
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 *RevisionsListCall) Context(ctx context.Context) *RevisionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RevisionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8688,6 +9390,9 @@
"fileId": c.fileId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8745,6 +9450,7 @@
revisionId string
revision *Revision
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a revision. This method supports patch semantics.
@@ -8764,6 +9470,14 @@
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 *RevisionsPatchCall) Context(ctx context.Context) *RevisionsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RevisionsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.revision)
@@ -8785,6 +9499,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8848,6 +9565,7 @@
revisionId string
revision *Revision
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a revision.
@@ -8867,6 +9585,14 @@
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 *RevisionsUpdateCall) Context(ctx context.Context) *RevisionsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RevisionsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.revision)
@@ -8888,6 +9614,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/fitness/v1/fitness-gen.go b/fitness/v1/fitness-gen.go
index 4a22c9d..a7b3a5d 100644
--- a/fitness/v1/fitness-gen.go
+++ b/fitness/v1/fitness-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "fitness:v1"
const apiName = "fitness"
@@ -658,6 +658,7 @@
userId string
datasource *DataSource
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a new data source that is unique across all data
@@ -684,6 +685,14 @@
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 *UsersDataSourcesCreateCall) Context(ctx context.Context) *UsersDataSourcesCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersDataSourcesCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.datasource)
@@ -704,6 +713,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -759,6 +771,7 @@
userId string
dataSourceId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete the data source if there are no datapoints associated
@@ -778,6 +791,14 @@
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 *UsersDataSourcesDeleteCall) Context(ctx context.Context) *UsersDataSourcesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersDataSourcesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -793,6 +814,9 @@
"dataSourceId": c.dataSourceId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -852,6 +876,7 @@
userId string
dataSourceId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns a data source identified by a data stream ID.
@@ -870,6 +895,14 @@
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 *UsersDataSourcesGetCall) Context(ctx context.Context) *UsersDataSourcesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersDataSourcesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -885,6 +918,9 @@
"dataSourceId": c.dataSourceId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -946,6 +982,7 @@
s *Service
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all data sources that are visible to the developer, using
@@ -974,6 +1011,14 @@
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 *UsersDataSourcesListCall) Context(ctx context.Context) *UsersDataSourcesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersDataSourcesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -991,6 +1036,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1053,6 +1101,7 @@
dataSourceId string
datasource *DataSource
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a given data source. It is an error to modify the data
@@ -1079,6 +1128,14 @@
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 *UsersDataSourcesPatchCall) Context(ctx context.Context) *UsersDataSourcesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersDataSourcesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.datasource)
@@ -1100,6 +1157,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1163,6 +1223,7 @@
dataSourceId string
datasource *DataSource
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a given data source. It is an error to modify the
@@ -1188,6 +1249,14 @@
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 *UsersDataSourcesUpdateCall) Context(ctx context.Context) *UsersDataSourcesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersDataSourcesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.datasource)
@@ -1209,6 +1278,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1272,6 +1344,7 @@
dataSourceId string
datasetId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Performs an inclusive delete of all data points whose start
@@ -1311,6 +1384,14 @@
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 *UsersDataSourcesDatasetsDeleteCall) Context(ctx context.Context) *UsersDataSourcesDatasetsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersDataSourcesDatasetsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1333,6 +1414,9 @@
"datasetId": c.datasetId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1405,6 +1489,7 @@
dataSourceId string
datasetId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns a dataset containing all data points whose start and end
@@ -1448,6 +1533,14 @@
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 *UsersDataSourcesDatasetsGetCall) Context(ctx context.Context) *UsersDataSourcesDatasetsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersDataSourcesDatasetsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1470,6 +1563,9 @@
"datasetId": c.datasetId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1552,6 +1648,7 @@
datasetId string
dataset *Dataset
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Adds data points to a dataset. The dataset need not be
@@ -1585,6 +1682,14 @@
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 *UsersDataSourcesDatasetsPatchCall) Context(ctx context.Context) *UsersDataSourcesDatasetsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersDataSourcesDatasetsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.dataset)
@@ -1610,6 +1715,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1685,6 +1793,7 @@
userId string
aggregaterequest *AggregateRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Aggregate: Aggregates data of a certain type or stream into buckets
@@ -1706,6 +1815,14 @@
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 *UsersDatasetAggregateCall) Context(ctx context.Context) *UsersDatasetAggregateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersDatasetAggregateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.aggregaterequest)
@@ -1726,6 +1843,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1781,6 +1901,7 @@
userId string
sessionId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a session specified by the given session ID.
@@ -1806,6 +1927,14 @@
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 *UsersSessionsDeleteCall) Context(ctx context.Context) *UsersSessionsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersSessionsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1824,6 +1953,9 @@
"sessionId": c.sessionId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1879,6 +2011,7 @@
s *Service
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists sessions previously created.
@@ -1930,6 +2063,14 @@
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 *UsersSessionsListCall) Context(ctx context.Context) *UsersSessionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersSessionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1956,6 +2097,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2032,6 +2176,7 @@
sessionId string
session *Session
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates or insert a given session.
@@ -2058,6 +2203,14 @@
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 *UsersSessionsUpdateCall) Context(ctx context.Context) *UsersSessionsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersSessionsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.session)
@@ -2082,6 +2235,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/freebase/v1/freebase-gen.go b/freebase/v1/freebase-gen.go
index 2998823..237643a 100644
--- a/freebase/v1/freebase-gen.go
+++ b/freebase/v1/freebase-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "freebase:v1"
const apiName = "freebase"
@@ -138,6 +138,7 @@
type ReconcileCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Reconcile: Reconcile entities to Freebase open data.
@@ -196,6 +197,14 @@
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 *ReconcileCall) Context(ctx context.Context) *ReconcileCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReconcileCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -226,6 +235,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -303,6 +315,7 @@
type SearchCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Search: Search Freebase open data.
@@ -513,6 +526,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *SearchCall) Context(ctx context.Context) *SearchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SearchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -594,6 +615,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/fusiontables/v1/fusiontables-gen.go b/fusiontables/v1/fusiontables-gen.go
index d598051..2d01245 100644
--- a/fusiontables/v1/fusiontables-gen.go
+++ b/fusiontables/v1/fusiontables-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "fusiontables:v1"
const apiName = "fusiontables"
@@ -578,6 +578,7 @@
tableId string
columnId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the column.
@@ -596,6 +597,14 @@
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 *ColumnDeleteCall) Context(ctx context.Context) *ColumnDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ColumnDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -611,6 +620,9 @@
"columnId": c.columnId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -661,6 +673,7 @@
tableId string
columnId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a specific column by its id.
@@ -679,6 +692,14 @@
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 *ColumnGetCall) Context(ctx context.Context) *ColumnGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ColumnGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -694,6 +715,9 @@
"columnId": c.columnId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -752,6 +776,7 @@
tableId string
column *Column
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Adds a new column to the table.
@@ -770,6 +795,14 @@
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 *ColumnInsertCall) Context(ctx context.Context) *ColumnInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ColumnInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.column)
@@ -790,6 +823,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -842,6 +878,7 @@
s *Service
tableId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of columns.
@@ -873,6 +910,14 @@
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 *ColumnListCall) Context(ctx context.Context) *ColumnListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ColumnListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -893,6 +938,9 @@
"tableId": c.tableId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -957,6 +1005,7 @@
columnId string
column *Column
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates the name or type of an existing column. This method
@@ -977,6 +1026,14 @@
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 *ColumnPatchCall) Context(ctx context.Context) *ColumnPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ColumnPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.column)
@@ -998,6 +1055,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1059,6 +1119,7 @@
columnId string
column *Column
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates the name or type of an existing column.
@@ -1078,6 +1139,14 @@
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 *ColumnUpdateCall) Context(ctx context.Context) *ColumnUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ColumnUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.column)
@@ -1099,6 +1168,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1158,6 +1230,7 @@
s *Service
sql string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Sql: Executes an SQL SELECT/INSERT/UPDATE/DELETE/SHOW/DESCRIBE/CREATE
@@ -1191,6 +1264,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *QuerySqlCall) Context(ctx context.Context) *QuerySqlCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *QuerySqlCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1210,6 +1291,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1286,6 +1370,7 @@
s *Service
sql string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SqlGet: Executes an SQL SELECT/SHOW/DESCRIBE statement.
@@ -1318,6 +1403,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *QuerySqlGetCall) Context(ctx context.Context) *QuerySqlGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *QuerySqlGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1337,6 +1430,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1414,6 +1510,7 @@
tableId string
styleId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a style.
@@ -1432,6 +1529,14 @@
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 *StyleDeleteCall) Context(ctx context.Context) *StyleDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *StyleDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1447,6 +1552,9 @@
"styleId": strconv.FormatInt(c.styleId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1498,6 +1606,7 @@
tableId string
styleId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a specific style.
@@ -1516,6 +1625,14 @@
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 *StyleGetCall) Context(ctx context.Context) *StyleGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *StyleGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1531,6 +1648,9 @@
"styleId": strconv.FormatInt(c.styleId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1590,6 +1710,7 @@
tableId string
stylesetting *StyleSetting
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Adds a new style for the table.
@@ -1608,6 +1729,14 @@
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 *StyleInsertCall) Context(ctx context.Context) *StyleInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *StyleInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.stylesetting)
@@ -1628,6 +1757,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1680,6 +1812,7 @@
s *Service
tableId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of styles.
@@ -1711,6 +1844,14 @@
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 *StyleListCall) Context(ctx context.Context) *StyleListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *StyleListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1731,6 +1872,9 @@
"tableId": c.tableId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1795,6 +1939,7 @@
styleId int64
stylesetting *StyleSetting
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing style. This method supports patch
@@ -1815,6 +1960,14 @@
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 *StylePatchCall) Context(ctx context.Context) *StylePatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *StylePatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.stylesetting)
@@ -1836,6 +1989,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1898,6 +2054,7 @@
styleId int64
stylesetting *StyleSetting
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing style.
@@ -1917,6 +2074,14 @@
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 *StyleUpdateCall) Context(ctx context.Context) *StyleUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *StyleUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.stylesetting)
@@ -1938,6 +2103,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1998,6 +2166,7 @@
s *Service
tableId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Copy: Copies a table.
@@ -2022,6 +2191,14 @@
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 *TableCopyCall) Context(ctx context.Context) *TableCopyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TableCopyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2039,6 +2216,9 @@
"tableId": c.tableId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2094,6 +2274,7 @@
s *Service
tableId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a table.
@@ -2111,6 +2292,14 @@
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 *TableDeleteCall) Context(ctx context.Context) *TableDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TableDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2125,6 +2314,9 @@
"tableId": c.tableId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2167,6 +2359,7 @@
s *Service
tableId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a specific table by its id.
@@ -2184,6 +2377,14 @@
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 *TableGetCall) Context(ctx context.Context) *TableGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TableGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2198,6 +2399,9 @@
"tableId": c.tableId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2251,8 +2455,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// ImportRows: Import more rows into a table.
@@ -2315,10 +2519,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *TableImportRowsCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *TableImportRowsCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -2343,6 +2549,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *TableImportRowsCall) Context(ctx context.Context) *TableImportRowsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TableImportRowsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2394,6 +2610,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2513,8 +2732,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// ImportTable: Import a new table.
@@ -2548,10 +2767,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *TableImportTableCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *TableImportTableCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -2576,6 +2797,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *TableImportTableCall) Context(ctx context.Context) *TableImportTableCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TableImportTableCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2617,6 +2848,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2716,6 +2950,7 @@
s *Service
table *Table
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a new table.
@@ -2733,6 +2968,14 @@
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 *TableInsertCall) Context(ctx context.Context) *TableInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TableInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.table)
@@ -2751,6 +2994,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2791,6 +3037,7 @@
type TableListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of tables a user owns.
@@ -2821,6 +3068,14 @@
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 *TableListCall) Context(ctx context.Context) *TableListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TableListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2839,6 +3094,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2893,6 +3151,7 @@
tableId string
table *Table
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing table. Unless explicitly requested, only
@@ -2922,6 +3181,14 @@
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 *TablePatchCall) Context(ctx context.Context) *TablePatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablePatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.table)
@@ -2945,6 +3212,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3003,6 +3273,7 @@
tableId string
table *Table
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing table. Unless explicitly requested, only
@@ -3031,6 +3302,14 @@
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 *TableUpdateCall) Context(ctx context.Context) *TableUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TableUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.table)
@@ -3054,6 +3333,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3112,6 +3394,7 @@
tableId string
taskId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the task, unless already started.
@@ -3130,6 +3413,14 @@
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 *TaskDeleteCall) Context(ctx context.Context) *TaskDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TaskDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3145,6 +3436,9 @@
"taskId": c.taskId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3194,6 +3488,7 @@
tableId string
taskId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a specific task by its id.
@@ -3212,6 +3507,14 @@
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 *TaskGetCall) Context(ctx context.Context) *TaskGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TaskGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3227,6 +3530,9 @@
"taskId": c.taskId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3283,6 +3589,7 @@
s *Service
tableId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of tasks.
@@ -3319,6 +3626,14 @@
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 *TaskListCall) Context(ctx context.Context) *TaskListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TaskListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3342,6 +3657,9 @@
"tableId": c.tableId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3409,6 +3727,7 @@
tableId string
templateId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a template
@@ -3427,6 +3746,14 @@
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 *TemplateDeleteCall) Context(ctx context.Context) *TemplateDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TemplateDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3442,6 +3769,9 @@
"templateId": strconv.FormatInt(c.templateId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3493,6 +3823,7 @@
tableId string
templateId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a specific template by its id
@@ -3511,6 +3842,14 @@
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 *TemplateGetCall) Context(ctx context.Context) *TemplateGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TemplateGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3526,6 +3865,9 @@
"templateId": strconv.FormatInt(c.templateId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3585,6 +3927,7 @@
tableId string
template *Template
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a new template for the table.
@@ -3603,6 +3946,14 @@
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 *TemplateInsertCall) Context(ctx context.Context) *TemplateInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TemplateInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.template)
@@ -3623,6 +3974,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3675,6 +4029,7 @@
s *Service
tableId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of templates.
@@ -3706,6 +4061,14 @@
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 *TemplateListCall) Context(ctx context.Context) *TemplateListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TemplateListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3726,6 +4089,9 @@
"tableId": c.tableId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3790,6 +4156,7 @@
templateId int64
template *Template
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing template. This method supports patch
@@ -3810,6 +4177,14 @@
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 *TemplatePatchCall) Context(ctx context.Context) *TemplatePatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TemplatePatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.template)
@@ -3831,6 +4206,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3893,6 +4271,7 @@
templateId int64
template *Template
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing template
@@ -3912,6 +4291,14 @@
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 *TemplateUpdateCall) Context(ctx context.Context) *TemplateUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TemplateUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.template)
@@ -3933,6 +4320,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/fusiontables/v2/fusiontables-gen.go b/fusiontables/v2/fusiontables-gen.go
index 582fe6b..5aae790 100644
--- a/fusiontables/v2/fusiontables-gen.go
+++ b/fusiontables/v2/fusiontables-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "fusiontables:v2"
const apiName = "fusiontables"
@@ -635,6 +635,7 @@
tableId string
columnId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified column.
@@ -653,6 +654,14 @@
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 *ColumnDeleteCall) Context(ctx context.Context) *ColumnDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ColumnDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -668,6 +677,9 @@
"columnId": c.columnId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -718,6 +730,7 @@
tableId string
columnId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a specific column by its ID.
@@ -736,6 +749,14 @@
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 *ColumnGetCall) Context(ctx context.Context) *ColumnGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ColumnGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -751,6 +772,9 @@
"columnId": c.columnId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -809,6 +833,7 @@
tableId string
column *Column
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Adds a new column to the table.
@@ -827,6 +852,14 @@
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 *ColumnInsertCall) Context(ctx context.Context) *ColumnInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ColumnInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.column)
@@ -847,6 +880,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -899,6 +935,7 @@
s *Service
tableId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of columns.
@@ -930,6 +967,14 @@
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 *ColumnListCall) Context(ctx context.Context) *ColumnListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ColumnListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -950,6 +995,9 @@
"tableId": c.tableId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1014,6 +1062,7 @@
columnId string
column *Column
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates the name or type of an existing column. This method
@@ -1034,6 +1083,14 @@
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 *ColumnPatchCall) Context(ctx context.Context) *ColumnPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ColumnPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.column)
@@ -1055,6 +1112,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1116,6 +1176,7 @@
columnId string
column *Column
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates the name or type of an existing column.
@@ -1135,6 +1196,14 @@
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 *ColumnUpdateCall) Context(ctx context.Context) *ColumnUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ColumnUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.column)
@@ -1156,6 +1225,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1215,6 +1287,7 @@
s *Service
sql string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Sql: Executes a Fusion Tables SQL statement, which can be any of
@@ -1254,6 +1327,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *QuerySqlCall) Context(ctx context.Context) *QuerySqlCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *QuerySqlCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1273,6 +1354,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1349,6 +1433,7 @@
s *Service
sql string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SqlGet: Executes a SQL statement which can be any of
@@ -1384,6 +1469,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *QuerySqlGetCall) Context(ctx context.Context) *QuerySqlGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *QuerySqlGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1403,6 +1496,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1480,6 +1576,7 @@
tableId string
styleId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a style.
@@ -1498,6 +1595,14 @@
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 *StyleDeleteCall) Context(ctx context.Context) *StyleDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *StyleDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1513,6 +1618,9 @@
"styleId": strconv.FormatInt(c.styleId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1564,6 +1672,7 @@
tableId string
styleId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a specific style.
@@ -1582,6 +1691,14 @@
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 *StyleGetCall) Context(ctx context.Context) *StyleGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *StyleGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1597,6 +1714,9 @@
"styleId": strconv.FormatInt(c.styleId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1656,6 +1776,7 @@
tableId string
stylesetting *StyleSetting
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Adds a new style for the table.
@@ -1674,6 +1795,14 @@
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 *StyleInsertCall) Context(ctx context.Context) *StyleInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *StyleInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.stylesetting)
@@ -1694,6 +1823,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1746,6 +1878,7 @@
s *Service
tableId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of styles.
@@ -1777,6 +1910,14 @@
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 *StyleListCall) Context(ctx context.Context) *StyleListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *StyleListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1797,6 +1938,9 @@
"tableId": c.tableId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1861,6 +2005,7 @@
styleId int64
stylesetting *StyleSetting
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing style. This method supports patch
@@ -1881,6 +2026,14 @@
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 *StylePatchCall) Context(ctx context.Context) *StylePatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *StylePatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.stylesetting)
@@ -1902,6 +2055,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1964,6 +2120,7 @@
styleId int64
stylesetting *StyleSetting
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing style.
@@ -1983,6 +2140,14 @@
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 *StyleUpdateCall) Context(ctx context.Context) *StyleUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *StyleUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.stylesetting)
@@ -2004,6 +2169,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2064,6 +2232,7 @@
s *Service
tableId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Copy: Copies a table.
@@ -2088,6 +2257,14 @@
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 *TableCopyCall) Context(ctx context.Context) *TableCopyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TableCopyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2105,6 +2282,9 @@
"tableId": c.tableId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2160,6 +2340,7 @@
s *Service
tableId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a table.
@@ -2177,6 +2358,14 @@
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 *TableDeleteCall) Context(ctx context.Context) *TableDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TableDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2191,6 +2380,9 @@
"tableId": c.tableId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2233,6 +2425,7 @@
s *Service
tableId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a specific table by its ID.
@@ -2250,6 +2443,14 @@
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 *TableGetCall) Context(ctx context.Context) *TableGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TableGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2264,6 +2465,9 @@
"tableId": c.tableId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2317,8 +2521,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// ImportRows: Imports more rows into a table.
@@ -2376,10 +2580,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *TableImportRowsCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *TableImportRowsCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -2404,6 +2610,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *TableImportRowsCall) Context(ctx context.Context) *TableImportRowsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TableImportRowsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2455,6 +2671,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2574,8 +2793,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// ImportTable: Imports a new table.
@@ -2609,10 +2828,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *TableImportTableCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *TableImportTableCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -2637,6 +2858,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *TableImportTableCall) Context(ctx context.Context) *TableImportTableCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TableImportTableCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2678,6 +2909,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2777,6 +3011,7 @@
s *Service
table *Table
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a new table.
@@ -2794,6 +3029,14 @@
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 *TableInsertCall) Context(ctx context.Context) *TableInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TableInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.table)
@@ -2812,6 +3055,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2852,6 +3098,7 @@
type TableListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of tables a user owns.
@@ -2882,6 +3129,14 @@
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 *TableListCall) Context(ctx context.Context) *TableListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TableListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2900,6 +3155,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2954,6 +3212,7 @@
tableId string
table *Table
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing table. Unless explicitly requested, only
@@ -2983,6 +3242,14 @@
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 *TablePatchCall) Context(ctx context.Context) *TablePatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablePatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.table)
@@ -3006,6 +3273,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3066,8 +3336,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// ReplaceRows: Replaces rows of an existing table. Current rows remain
@@ -3128,10 +3398,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *TableReplaceRowsCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *TableReplaceRowsCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -3156,6 +3428,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *TableReplaceRowsCall) Context(ctx context.Context) *TableReplaceRowsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TableReplaceRowsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3207,6 +3489,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3324,6 +3609,7 @@
tableId string
table *Table
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing table. Unless explicitly requested, only
@@ -3352,6 +3638,14 @@
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 *TableUpdateCall) Context(ctx context.Context) *TableUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TableUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.table)
@@ -3375,6 +3669,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3433,6 +3730,7 @@
tableId string
taskId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a specific task by its ID, unless that task has
@@ -3452,6 +3750,14 @@
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 *TaskDeleteCall) Context(ctx context.Context) *TaskDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TaskDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3467,6 +3773,9 @@
"taskId": c.taskId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3517,6 +3826,7 @@
tableId string
taskId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a specific task by its ID.
@@ -3535,6 +3845,14 @@
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 *TaskGetCall) Context(ctx context.Context) *TaskGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TaskGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3550,6 +3868,9 @@
"taskId": c.taskId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3607,6 +3928,7 @@
s *Service
tableId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of tasks.
@@ -3645,6 +3967,14 @@
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 *TaskListCall) Context(ctx context.Context) *TaskListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TaskListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3668,6 +3998,9 @@
"tableId": c.tableId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3737,6 +4070,7 @@
tableId string
templateId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a template
@@ -3755,6 +4089,14 @@
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 *TemplateDeleteCall) Context(ctx context.Context) *TemplateDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TemplateDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3770,6 +4112,9 @@
"templateId": strconv.FormatInt(c.templateId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3821,6 +4166,7 @@
tableId string
templateId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a specific template by its id
@@ -3839,6 +4185,14 @@
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 *TemplateGetCall) Context(ctx context.Context) *TemplateGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TemplateGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3854,6 +4208,9 @@
"templateId": strconv.FormatInt(c.templateId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3913,6 +4270,7 @@
tableId string
template *Template
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a new template for the table.
@@ -3931,6 +4289,14 @@
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 *TemplateInsertCall) Context(ctx context.Context) *TemplateInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TemplateInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.template)
@@ -3951,6 +4317,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4003,6 +4372,7 @@
s *Service
tableId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of templates.
@@ -4034,6 +4404,14 @@
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 *TemplateListCall) Context(ctx context.Context) *TemplateListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TemplateListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4054,6 +4432,9 @@
"tableId": c.tableId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4118,6 +4499,7 @@
templateId int64
template *Template
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing template. This method supports patch
@@ -4138,6 +4520,14 @@
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 *TemplatePatchCall) Context(ctx context.Context) *TemplatePatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TemplatePatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.template)
@@ -4159,6 +4549,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4221,6 +4614,7 @@
templateId int64
template *Template
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing template
@@ -4240,6 +4634,14 @@
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 *TemplateUpdateCall) Context(ctx context.Context) *TemplateUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TemplateUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.template)
@@ -4261,6 +4663,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/games/v1/games-gen.go b/games/v1/games-gen.go
index ada6620..a10ffbf 100644
--- a/games/v1/games-gen.go
+++ b/games/v1/games-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "games:v1"
const apiName = "games"
@@ -2607,6 +2607,7 @@
type AchievementDefinitionsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all the achievement definitions for your application.
@@ -2646,6 +2647,14 @@
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 *AchievementDefinitionsListCall) Context(ctx context.Context) *AchievementDefinitionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AchievementDefinitionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2667,6 +2676,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2727,6 +2739,7 @@
achievementId string
stepsToIncrement int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Increment: Increments the steps of the achievement with the given ID
@@ -2755,6 +2768,14 @@
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 *AchievementsIncrementCall) Context(ctx context.Context) *AchievementsIncrementCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AchievementsIncrementCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2773,6 +2794,9 @@
"achievementId": c.achievementId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2838,6 +2862,7 @@
s *Service
playerId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the progress for all your application's achievements for
@@ -2893,6 +2918,14 @@
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 *AchievementsListCall) Context(ctx context.Context) *AchievementsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AchievementsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2919,6 +2952,9 @@
"playerId": c.playerId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3004,6 +3040,7 @@
s *Service
achievementId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Reveal: Sets the state of the achievement with the given ID to
@@ -3022,6 +3059,14 @@
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 *AchievementsRevealCall) Context(ctx context.Context) *AchievementsRevealCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AchievementsRevealCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3036,6 +3081,9 @@
"achievementId": c.achievementId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3087,6 +3135,7 @@
achievementId string
steps int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetStepsAtLeast: Sets the steps for the currently authenticated
@@ -3108,6 +3157,14 @@
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 *AchievementsSetStepsAtLeastCall) Context(ctx context.Context) *AchievementsSetStepsAtLeastCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AchievementsSetStepsAtLeastCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3123,6 +3180,9 @@
"achievementId": c.achievementId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3182,6 +3242,7 @@
s *Service
achievementId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Unlock: Unlocks this achievement for the currently authenticated
@@ -3200,6 +3261,14 @@
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 *AchievementsUnlockCall) Context(ctx context.Context) *AchievementsUnlockCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AchievementsUnlockCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3214,6 +3283,9 @@
"achievementId": c.achievementId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3264,6 +3336,7 @@
s *Service
achievementupdatemultiplerequest *AchievementUpdateMultipleRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// UpdateMultiple: Updates multiple achievements for the currently
@@ -3282,6 +3355,14 @@
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 *AchievementsUpdateMultipleCall) Context(ctx context.Context) *AchievementsUpdateMultipleCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AchievementsUpdateMultipleCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.achievementupdatemultiplerequest)
@@ -3300,6 +3381,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3342,6 +3426,7 @@
s *Service
applicationId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves the metadata of the application with the given ID. If
@@ -3382,6 +3467,14 @@
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 *ApplicationsGetCall) Context(ctx context.Context) *ApplicationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ApplicationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3402,6 +3495,9 @@
"applicationId": c.applicationId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3471,6 +3567,7 @@
type ApplicationsPlayedCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Played: Indicate that the the currently authenticated user is playing
@@ -3488,6 +3585,14 @@
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 *ApplicationsPlayedCall) Context(ctx context.Context) *ApplicationsPlayedCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ApplicationsPlayedCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3500,6 +3605,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3531,6 +3639,7 @@
type EventsListByPlayerCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ListByPlayer: Returns a list showing the current progress on events
@@ -3571,6 +3680,14 @@
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 *EventsListByPlayerCall) Context(ctx context.Context) *EventsListByPlayerCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventsListByPlayerCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3592,6 +3709,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3650,6 +3770,7 @@
type EventsListDefinitionsCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ListDefinitions: Returns a list of the event definitions in this
@@ -3690,6 +3811,14 @@
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 *EventsListDefinitionsCall) Context(ctx context.Context) *EventsListDefinitionsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventsListDefinitionsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3711,6 +3840,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3770,6 +3902,7 @@
s *Service
eventrecordrequest *EventRecordRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Record: Records a batch of changes to the number of times events have
@@ -3795,6 +3928,14 @@
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 *EventsRecordCall) Context(ctx context.Context) *EventsRecordCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventsRecordCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventrecordrequest)
@@ -3816,6 +3957,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3865,6 +4009,7 @@
s *Service
leaderboardId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves the metadata of the leaderboard with the given ID.
@@ -3889,6 +4034,14 @@
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 *LeaderboardsGetCall) Context(ctx context.Context) *LeaderboardsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LeaderboardsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3906,6 +4059,9 @@
"leaderboardId": c.leaderboardId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3960,6 +4116,7 @@
type LeaderboardsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all the leaderboard metadata for your application.
@@ -3999,6 +4156,14 @@
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 *LeaderboardsListCall) Context(ctx context.Context) *LeaderboardsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LeaderboardsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4020,6 +4185,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4078,6 +4246,7 @@
type MetagameGetMetagameConfigCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetMetagameConfig: Return the metagame configuration data for the
@@ -4095,6 +4264,14 @@
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 *MetagameGetMetagameConfigCall) Context(ctx context.Context) *MetagameGetMetagameConfigCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MetagameGetMetagameConfigCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4107,6 +4284,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4147,6 +4327,7 @@
playerId string
collection string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ListCategoriesByPlayer: List play data aggregated per category for
@@ -4189,6 +4370,14 @@
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 *MetagameListCategoriesByPlayerCall) Context(ctx context.Context) *MetagameListCategoriesByPlayerCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MetagameListCategoriesByPlayerCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4213,6 +4402,9 @@
"collection": c.collection,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4294,6 +4486,7 @@
s *Service
playerId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves the Player resource with the given ID. To retrieve the
@@ -4319,6 +4512,14 @@
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 *PlayersGetCall) Context(ctx context.Context) *PlayersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlayersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4336,6 +4537,9 @@
"playerId": c.playerId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4391,6 +4595,7 @@
s *Service
collection string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Get the collection of players for the currently authenticated
@@ -4432,6 +4637,14 @@
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 *PlayersListCall) Context(ctx context.Context) *PlayersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlayersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4455,6 +4668,9 @@
"collection": c.collection,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4531,6 +4747,7 @@
s *Service
pushtokenid *PushTokenId
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Remove: Removes a push token for the current user and application.
@@ -4549,6 +4766,14 @@
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 *PushtokensRemoveCall) Context(ctx context.Context) *PushtokensRemoveCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PushtokensRemoveCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.pushtokenid)
@@ -4567,6 +4792,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4602,6 +4830,7 @@
s *Service
pushtoken *PushToken
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Registers a push token for the current user and application.
@@ -4619,6 +4848,14 @@
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 *PushtokensUpdateCall) Context(ctx context.Context) *PushtokensUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PushtokensUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.pushtoken)
@@ -4637,6 +4874,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4674,6 +4914,7 @@
milestoneId string
requestId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Claim: Report that a reward for the milestone corresponding to
@@ -4695,6 +4936,14 @@
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 *QuestMilestonesClaimCall) Context(ctx context.Context) *QuestMilestonesClaimCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *QuestMilestonesClaimCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4711,6 +4960,9 @@
"milestoneId": c.milestoneId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4769,6 +5021,7 @@
s *Service
questId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Accept: Indicates that the currently authorized user will participate
@@ -4794,6 +5047,14 @@
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 *QuestsAcceptCall) Context(ctx context.Context) *QuestsAcceptCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *QuestsAcceptCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4811,6 +5072,9 @@
"questId": c.questId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4866,6 +5130,7 @@
s *Service
playerId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Get a list of quests for your application and the currently
@@ -4908,6 +5173,14 @@
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 *QuestsListCall) Context(ctx context.Context) *QuestsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *QuestsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4931,6 +5204,9 @@
"playerId": c.playerId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4999,6 +5275,7 @@
s *Service
clientRevision string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Check: Checks whether the games client is out of date.
@@ -5016,6 +5293,14 @@
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 *RevisionsCheckCall) Context(ctx context.Context) *RevisionsCheckCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RevisionsCheckCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5029,6 +5314,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5079,6 +5367,7 @@
s *Service
roomcreaterequest *RoomCreateRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Create a room. For internal use by the Games SDK only.
@@ -5104,6 +5393,14 @@
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 *RoomsCreateCall) Context(ctx context.Context) *RoomsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RoomsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.roomcreaterequest)
@@ -5125,6 +5422,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5174,6 +5474,7 @@
s *Service
roomId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Decline: Decline an invitation to join a room. For internal use by
@@ -5199,6 +5500,14 @@
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 *RoomsDeclineCall) Context(ctx context.Context) *RoomsDeclineCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RoomsDeclineCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5216,6 +5525,9 @@
"roomId": c.roomId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5271,6 +5583,7 @@
s *Service
roomId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Dismiss: Dismiss an invitation to join a room. For internal use by
@@ -5289,6 +5602,14 @@
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 *RoomsDismissCall) Context(ctx context.Context) *RoomsDismissCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RoomsDismissCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5303,6 +5624,9 @@
"roomId": c.roomId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5346,6 +5670,7 @@
s *Service
roomId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get the data for a room.
@@ -5370,6 +5695,14 @@
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 *RoomsGetCall) Context(ctx context.Context) *RoomsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RoomsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5387,6 +5720,9 @@
"roomId": c.roomId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5443,6 +5779,7 @@
roomId string
roomjoinrequest *RoomJoinRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Join: Join a room. For internal use by the Games SDK only. Calling
@@ -5469,6 +5806,14 @@
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 *RoomsJoinCall) Context(ctx context.Context) *RoomsJoinCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RoomsJoinCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.roomjoinrequest)
@@ -5492,6 +5837,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5551,6 +5899,7 @@
roomId string
roomleaverequest *RoomLeaveRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Leave: Leave a room. For internal use by the Games SDK only. Calling
@@ -5577,6 +5926,14 @@
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 *RoomsLeaveCall) Context(ctx context.Context) *RoomsLeaveCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RoomsLeaveCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.roomleaverequest)
@@ -5600,6 +5957,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5657,6 +6017,7 @@
type RoomsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns invitations to join rooms.
@@ -5696,6 +6057,14 @@
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 *RoomsListCall) Context(ctx context.Context) *RoomsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RoomsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5717,6 +6086,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5777,6 +6149,7 @@
roomId string
roomp2pstatuses *RoomP2PStatuses
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ReportStatus: Updates sent by a client reporting the status of peers
@@ -5804,6 +6177,14 @@
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 *RoomsReportStatusCall) Context(ctx context.Context) *RoomsReportStatusCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RoomsReportStatusCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.roomp2pstatuses)
@@ -5827,6 +6208,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5887,6 +6271,7 @@
leaderboardId string
timeSpan string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get high scores, and optionally ranks, in leaderboards for the
@@ -5948,6 +6333,14 @@
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 *ScoresGetCall) Context(ctx context.Context) *ScoresGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ScoresGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5976,6 +6369,9 @@
"timeSpan": c.timeSpan,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6087,6 +6483,7 @@
collection string
timeSpan string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the scores in a leaderboard, starting from the top.
@@ -6129,6 +6526,14 @@
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 *ScoresListCall) Context(ctx context.Context) *ScoresListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ScoresListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6154,6 +6559,9 @@
"collection": c.collection,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6256,6 +6664,7 @@
collection string
timeSpan string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ListWindow: Lists the scores in a leaderboard around (and including)
@@ -6317,6 +6726,14 @@
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 *ScoresListWindowCall) Context(ctx context.Context) *ScoresListWindowCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ScoresListWindowCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6348,6 +6765,9 @@
"collection": c.collection,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6460,6 +6880,7 @@
leaderboardId string
score int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Submit: Submits a score to the specified leaderboard.
@@ -6494,6 +6915,14 @@
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 *ScoresSubmitCall) Context(ctx context.Context) *ScoresSubmitCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ScoresSubmitCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6515,6 +6944,9 @@
"leaderboardId": c.leaderboardId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6584,6 +7016,7 @@
s *Service
playerscoresubmissionlist *PlayerScoreSubmissionList
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SubmitMultiple: Submits multiple scores to leaderboards.
@@ -6608,6 +7041,14 @@
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 *ScoresSubmitMultipleCall) Context(ctx context.Context) *ScoresSubmitMultipleCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ScoresSubmitMultipleCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.playerscoresubmissionlist)
@@ -6629,6 +7070,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6678,6 +7122,7 @@
s *Service
snapshotId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves the metadata for a given snapshot ID.
@@ -6702,6 +7147,14 @@
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 *SnapshotsGetCall) Context(ctx context.Context) *SnapshotsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SnapshotsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6719,6 +7172,9 @@
"snapshotId": c.snapshotId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6775,6 +7231,7 @@
s *Service
playerId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of snapshots created by your application for
@@ -6816,6 +7273,14 @@
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 *SnapshotsListCall) Context(ctx context.Context) *SnapshotsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SnapshotsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6839,6 +7304,9 @@
"playerId": c.playerId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6908,6 +7376,7 @@
s *Service
matchId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Cancel: Cancel a turn-based match.
@@ -6925,6 +7394,14 @@
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 *TurnBasedMatchesCancelCall) Context(ctx context.Context) *TurnBasedMatchesCancelCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TurnBasedMatchesCancelCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6939,6 +7416,9 @@
"matchId": c.matchId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6982,6 +7462,7 @@
s *Service
turnbasedmatchcreaterequest *TurnBasedMatchCreateRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Create a turn-based match.
@@ -7006,6 +7487,14 @@
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 *TurnBasedMatchesCreateCall) Context(ctx context.Context) *TurnBasedMatchesCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TurnBasedMatchesCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.turnbasedmatchcreaterequest)
@@ -7027,6 +7516,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7076,6 +7568,7 @@
s *Service
matchId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Decline: Decline an invitation to play a turn-based match.
@@ -7100,6 +7593,14 @@
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 *TurnBasedMatchesDeclineCall) Context(ctx context.Context) *TurnBasedMatchesDeclineCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TurnBasedMatchesDeclineCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7117,6 +7618,9 @@
"matchId": c.matchId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7172,6 +7676,7 @@
s *Service
matchId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Dismiss: Dismiss a turn-based match from the match list. The match
@@ -7191,6 +7696,14 @@
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 *TurnBasedMatchesDismissCall) Context(ctx context.Context) *TurnBasedMatchesDismissCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TurnBasedMatchesDismissCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7205,6 +7718,9 @@
"matchId": c.matchId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7249,6 +7765,7 @@
matchId string
turnbasedmatchresults *TurnBasedMatchResults
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Finish: Finish a turn-based match. Each player should make this call
@@ -7276,6 +7793,14 @@
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 *TurnBasedMatchesFinishCall) Context(ctx context.Context) *TurnBasedMatchesFinishCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TurnBasedMatchesFinishCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.turnbasedmatchresults)
@@ -7299,6 +7824,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7357,6 +7885,7 @@
s *Service
matchId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get the data for a turn-based match.
@@ -7388,6 +7917,14 @@
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 *TurnBasedMatchesGetCall) Context(ctx context.Context) *TurnBasedMatchesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TurnBasedMatchesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7408,6 +7945,9 @@
"matchId": c.matchId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7468,6 +8008,7 @@
s *Service
matchId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Join: Join a turn-based match.
@@ -7492,6 +8033,14 @@
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 *TurnBasedMatchesJoinCall) Context(ctx context.Context) *TurnBasedMatchesJoinCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TurnBasedMatchesJoinCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7509,6 +8058,9 @@
"matchId": c.matchId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7564,6 +8116,7 @@
s *Service
matchId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Leave: Leave a turn-based match when it is not the current player's
@@ -7589,6 +8142,14 @@
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 *TurnBasedMatchesLeaveCall) Context(ctx context.Context) *TurnBasedMatchesLeaveCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TurnBasedMatchesLeaveCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7606,6 +8167,9 @@
"matchId": c.matchId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7662,6 +8226,7 @@
matchId string
matchVersion int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// LeaveTurn: Leave a turn-based match during the current player's turn,
@@ -7698,6 +8263,14 @@
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 *TurnBasedMatchesLeaveTurnCall) Context(ctx context.Context) *TurnBasedMatchesLeaveTurnCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TurnBasedMatchesLeaveTurnCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7719,6 +8292,9 @@
"matchId": c.matchId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7786,6 +8362,7 @@
type TurnBasedMatchesListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns turn-based matches the player is or was involved in.
@@ -7845,6 +8422,14 @@
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 *TurnBasedMatchesListCall) Context(ctx context.Context) *TurnBasedMatchesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TurnBasedMatchesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7872,6 +8457,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7944,6 +8532,7 @@
s *Service
matchId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Rematch: Create a rematch of a match that was previously completed,
@@ -7980,6 +8569,14 @@
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 *TurnBasedMatchesRematchCall) Context(ctx context.Context) *TurnBasedMatchesRematchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TurnBasedMatchesRematchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8000,6 +8597,9 @@
"matchId": c.matchId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8060,6 +8660,7 @@
type TurnBasedMatchesSyncCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Sync: Returns turn-based matches the player is or was involved in
@@ -8122,6 +8723,14 @@
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 *TurnBasedMatchesSyncCall) Context(ctx context.Context) *TurnBasedMatchesSyncCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TurnBasedMatchesSyncCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8149,6 +8758,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8222,6 +8834,7 @@
matchId string
turnbasedmatchturn *TurnBasedMatchTurn
opt_ map[string]interface{}
+ ctx_ context.Context
}
// TakeTurn: Commit the results of a player turn.
@@ -8247,6 +8860,14 @@
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 *TurnBasedMatchesTakeTurnCall) Context(ctx context.Context) *TurnBasedMatchesTakeTurnCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TurnBasedMatchesTakeTurnCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.turnbasedmatchturn)
@@ -8270,6 +8891,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/gamesconfiguration/v1configuration/gamesconfiguration-gen.go b/gamesconfiguration/v1configuration/gamesconfiguration-gen.go
index 2b0f3d9..fe661e3 100644
--- a/gamesconfiguration/v1configuration/gamesconfiguration-gen.go
+++ b/gamesconfiguration/v1configuration/gamesconfiguration-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "gamesConfiguration:v1configuration"
const apiName = "gamesConfiguration"
@@ -353,6 +353,7 @@
s *Service
achievementId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete the achievement configuration with the given ID.
@@ -370,6 +371,14 @@
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 *AchievementConfigurationsDeleteCall) Context(ctx context.Context) *AchievementConfigurationsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AchievementConfigurationsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -384,6 +393,9 @@
"achievementId": c.achievementId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -426,6 +438,7 @@
s *Service
achievementId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves the metadata of the achievement configuration with the
@@ -444,6 +457,14 @@
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 *AchievementConfigurationsGetCall) Context(ctx context.Context) *AchievementConfigurationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AchievementConfigurationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -458,6 +479,9 @@
"achievementId": c.achievementId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -508,6 +532,7 @@
applicationId string
achievementconfiguration *AchievementConfiguration
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Insert a new achievement configuration in this application.
@@ -526,6 +551,14 @@
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 *AchievementConfigurationsInsertCall) Context(ctx context.Context) *AchievementConfigurationsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AchievementConfigurationsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.achievementconfiguration)
@@ -546,6 +579,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -598,6 +634,7 @@
s *Service
applicationId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns a list of the achievement configurations in this
@@ -632,6 +669,14 @@
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 *AchievementConfigurationsListCall) Context(ctx context.Context) *AchievementConfigurationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AchievementConfigurationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -652,6 +697,9 @@
"applicationId": c.applicationId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -715,6 +763,7 @@
achievementId string
achievementconfiguration *AchievementConfiguration
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Update the metadata of the achievement configuration with the
@@ -734,6 +783,14 @@
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 *AchievementConfigurationsPatchCall) Context(ctx context.Context) *AchievementConfigurationsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AchievementConfigurationsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.achievementconfiguration)
@@ -754,6 +811,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -807,6 +867,7 @@
achievementId string
achievementconfiguration *AchievementConfiguration
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Update the metadata of the achievement configuration with the
@@ -826,6 +887,14 @@
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 *AchievementConfigurationsUpdateCall) Context(ctx context.Context) *AchievementConfigurationsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AchievementConfigurationsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.achievementconfiguration)
@@ -846,6 +915,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -902,8 +974,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Upload: Uploads an image for a resource with the given ID and image
@@ -923,10 +995,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *ImageConfigurationsUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ImageConfigurationsUploadCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -951,6 +1025,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *ImageConfigurationsUploadCall) Context(ctx context.Context) *ImageConfigurationsUploadCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ImageConfigurationsUploadCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -988,6 +1072,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1092,6 +1179,7 @@
s *Service
leaderboardId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete the leaderboard configuration with the given ID.
@@ -1109,6 +1197,14 @@
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 *LeaderboardConfigurationsDeleteCall) Context(ctx context.Context) *LeaderboardConfigurationsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LeaderboardConfigurationsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1123,6 +1219,9 @@
"leaderboardId": c.leaderboardId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1165,6 +1264,7 @@
s *Service
leaderboardId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves the metadata of the leaderboard configuration with the
@@ -1183,6 +1283,14 @@
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 *LeaderboardConfigurationsGetCall) Context(ctx context.Context) *LeaderboardConfigurationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LeaderboardConfigurationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1197,6 +1305,9 @@
"leaderboardId": c.leaderboardId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1247,6 +1358,7 @@
applicationId string
leaderboardconfiguration *LeaderboardConfiguration
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Insert a new leaderboard configuration in this application.
@@ -1265,6 +1377,14 @@
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 *LeaderboardConfigurationsInsertCall) Context(ctx context.Context) *LeaderboardConfigurationsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LeaderboardConfigurationsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.leaderboardconfiguration)
@@ -1285,6 +1405,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1337,6 +1460,7 @@
s *Service
applicationId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns a list of the leaderboard configurations in this
@@ -1371,6 +1495,14 @@
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 *LeaderboardConfigurationsListCall) Context(ctx context.Context) *LeaderboardConfigurationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LeaderboardConfigurationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1391,6 +1523,9 @@
"applicationId": c.applicationId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1454,6 +1589,7 @@
leaderboardId string
leaderboardconfiguration *LeaderboardConfiguration
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Update the metadata of the leaderboard configuration with the
@@ -1473,6 +1609,14 @@
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 *LeaderboardConfigurationsPatchCall) Context(ctx context.Context) *LeaderboardConfigurationsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LeaderboardConfigurationsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.leaderboardconfiguration)
@@ -1493,6 +1637,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1546,6 +1693,7 @@
leaderboardId string
leaderboardconfiguration *LeaderboardConfiguration
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Update the metadata of the leaderboard configuration with the
@@ -1565,6 +1713,14 @@
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 *LeaderboardConfigurationsUpdateCall) Context(ctx context.Context) *LeaderboardConfigurationsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LeaderboardConfigurationsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.leaderboardconfiguration)
@@ -1585,6 +1741,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/gamesmanagement/v1management/gamesmanagement-gen.go b/gamesmanagement/v1management/gamesmanagement-gen.go
index 9e2b00c..e5d36ef 100644
--- a/gamesmanagement/v1management/gamesmanagement-gen.go
+++ b/gamesmanagement/v1management/gamesmanagement-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "gamesManagement:v1management"
const apiName = "gamesManagement"
@@ -400,6 +400,7 @@
s *Service
achievementId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Reset: Resets the achievement with the given ID for the currently
@@ -419,6 +420,14 @@
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 *AchievementsResetCall) Context(ctx context.Context) *AchievementsResetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AchievementsResetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -433,6 +442,9 @@
"achievementId": c.achievementId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -482,6 +494,7 @@
type AchievementsResetAllCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ResetAll: Resets all achievements for the currently authenticated
@@ -500,6 +513,14 @@
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 *AchievementsResetAllCall) Context(ctx context.Context) *AchievementsResetAllCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AchievementsResetAllCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -512,6 +533,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -550,6 +574,7 @@
type AchievementsResetAllForAllPlayersCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ResetAllForAllPlayers: Resets all draft achievements for all players.
@@ -568,6 +593,14 @@
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 *AchievementsResetAllForAllPlayersCall) Context(ctx context.Context) *AchievementsResetAllForAllPlayersCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AchievementsResetAllForAllPlayersCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -580,6 +613,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -612,6 +648,7 @@
s *Service
achievementId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ResetForAllPlayers: Resets the achievement with the given ID for all
@@ -631,6 +668,14 @@
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 *AchievementsResetForAllPlayersCall) Context(ctx context.Context) *AchievementsResetForAllPlayersCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AchievementsResetForAllPlayersCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -645,6 +690,9 @@
"achievementId": c.achievementId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -688,6 +736,7 @@
s *Service
achievementresetmultipleforallrequest *AchievementResetMultipleForAllRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ResetMultipleForAllPlayers: Resets achievements with the given IDs
@@ -707,6 +756,14 @@
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 *AchievementsResetMultipleForAllPlayersCall) Context(ctx context.Context) *AchievementsResetMultipleForAllPlayersCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AchievementsResetMultipleForAllPlayersCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.achievementresetmultipleforallrequest)
@@ -725,6 +782,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -760,6 +820,7 @@
s *Service
applicationId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ListHidden: Get the list of players hidden from the given
@@ -795,6 +856,14 @@
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 *ApplicationsListHiddenCall) Context(ctx context.Context) *ApplicationsListHiddenCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ApplicationsListHiddenCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -815,6 +884,9 @@
"applicationId": c.applicationId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -878,6 +950,7 @@
s *Service
eventId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Reset: Resets all player progress on the event with the given ID for
@@ -898,6 +971,14 @@
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 *EventsResetCall) Context(ctx context.Context) *EventsResetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventsResetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -912,6 +993,9 @@
"eventId": c.eventId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -954,6 +1038,7 @@
type EventsResetAllCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ResetAll: Resets all player progress on all events for the currently
@@ -973,6 +1058,14 @@
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 *EventsResetAllCall) Context(ctx context.Context) *EventsResetAllCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventsResetAllCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -985,6 +1078,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1016,6 +1112,7 @@
type EventsResetAllForAllPlayersCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ResetAllForAllPlayers: Resets all draft events for all players. This
@@ -1034,6 +1131,14 @@
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 *EventsResetAllForAllPlayersCall) Context(ctx context.Context) *EventsResetAllForAllPlayersCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventsResetAllForAllPlayersCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1046,6 +1151,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1078,6 +1186,7 @@
s *Service
eventId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ResetForAllPlayers: Resets the event with the given ID for all
@@ -1098,6 +1207,14 @@
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 *EventsResetForAllPlayersCall) Context(ctx context.Context) *EventsResetForAllPlayersCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventsResetForAllPlayersCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1112,6 +1229,9 @@
"eventId": c.eventId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1155,6 +1275,7 @@
s *Service
eventsresetmultipleforallrequest *EventsResetMultipleForAllRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ResetMultipleForAllPlayers: Resets events with the given IDs for all
@@ -1175,6 +1296,14 @@
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 *EventsResetMultipleForAllPlayersCall) Context(ctx context.Context) *EventsResetMultipleForAllPlayersCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventsResetMultipleForAllPlayersCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventsresetmultipleforallrequest)
@@ -1193,6 +1322,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1229,6 +1361,7 @@
applicationId string
playerId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Hide: Hide the given player's leaderboard scores from the given
@@ -1249,6 +1382,14 @@
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 *PlayersHideCall) Context(ctx context.Context) *PlayersHideCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlayersHideCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1264,6 +1405,9 @@
"playerId": c.playerId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1315,6 +1459,7 @@
applicationId string
playerId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Unhide: Unhide the given player's leaderboard scores from the given
@@ -1335,6 +1480,14 @@
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 *PlayersUnhideCall) Context(ctx context.Context) *PlayersUnhideCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlayersUnhideCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1350,6 +1503,9 @@
"playerId": c.playerId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1400,6 +1556,7 @@
s *Service
questId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Reset: Resets all player progress on the quest with the given ID for
@@ -1419,6 +1576,14 @@
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 *QuestsResetCall) Context(ctx context.Context) *QuestsResetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *QuestsResetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1433,6 +1598,9 @@
"questId": c.questId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1475,6 +1643,7 @@
type QuestsResetAllCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ResetAll: Resets all player progress on all quests for the currently
@@ -1493,6 +1662,14 @@
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 *QuestsResetAllCall) Context(ctx context.Context) *QuestsResetAllCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *QuestsResetAllCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1505,6 +1682,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1536,6 +1716,7 @@
type QuestsResetAllForAllPlayersCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ResetAllForAllPlayers: Resets all draft quests for all players. This
@@ -1553,6 +1734,14 @@
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 *QuestsResetAllForAllPlayersCall) Context(ctx context.Context) *QuestsResetAllForAllPlayersCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *QuestsResetAllForAllPlayersCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1565,6 +1754,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1597,6 +1789,7 @@
s *Service
questId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ResetForAllPlayers: Resets all player progress on the quest with the
@@ -1616,6 +1809,14 @@
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 *QuestsResetForAllPlayersCall) Context(ctx context.Context) *QuestsResetForAllPlayersCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *QuestsResetForAllPlayersCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1630,6 +1831,9 @@
"questId": c.questId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1673,6 +1877,7 @@
s *Service
questsresetmultipleforallrequest *QuestsResetMultipleForAllRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ResetMultipleForAllPlayers: Resets quests with the given IDs for all
@@ -1692,6 +1897,14 @@
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 *QuestsResetMultipleForAllPlayersCall) Context(ctx context.Context) *QuestsResetMultipleForAllPlayersCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *QuestsResetMultipleForAllPlayersCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.questsresetmultipleforallrequest)
@@ -1710,6 +1923,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1744,6 +1960,7 @@
type RoomsResetCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Reset: Reset all rooms for the currently authenticated player for
@@ -1762,6 +1979,14 @@
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 *RoomsResetCall) Context(ctx context.Context) *RoomsResetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RoomsResetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1774,6 +1999,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1805,6 +2033,7 @@
type RoomsResetForAllPlayersCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ResetForAllPlayers: Deletes rooms where the only room participants
@@ -1823,6 +2052,14 @@
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 *RoomsResetForAllPlayersCall) Context(ctx context.Context) *RoomsResetForAllPlayersCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RoomsResetForAllPlayersCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1835,6 +2072,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1867,6 +2107,7 @@
s *Service
leaderboardId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Reset: Resets scores for the leaderboard with the given ID for the
@@ -1886,6 +2127,14 @@
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 *ScoresResetCall) Context(ctx context.Context) *ScoresResetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ScoresResetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1900,6 +2149,9 @@
"leaderboardId": c.leaderboardId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1949,6 +2201,7 @@
type ScoresResetAllCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ResetAll: Resets all scores for all leaderboards for the currently
@@ -1967,6 +2220,14 @@
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 *ScoresResetAllCall) Context(ctx context.Context) *ScoresResetAllCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ScoresResetAllCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1979,6 +2240,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2017,6 +2281,7 @@
type ScoresResetAllForAllPlayersCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ResetAllForAllPlayers: Resets scores for all draft leaderboards for
@@ -2035,6 +2300,14 @@
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 *ScoresResetAllForAllPlayersCall) Context(ctx context.Context) *ScoresResetAllForAllPlayersCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ScoresResetAllForAllPlayersCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2047,6 +2320,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2079,6 +2355,7 @@
s *Service
leaderboardId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ResetForAllPlayers: Resets scores for the leaderboard with the given
@@ -2098,6 +2375,14 @@
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 *ScoresResetForAllPlayersCall) Context(ctx context.Context) *ScoresResetForAllPlayersCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ScoresResetForAllPlayersCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2112,6 +2397,9 @@
"leaderboardId": c.leaderboardId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2155,6 +2443,7 @@
s *Service
scoresresetmultipleforallrequest *ScoresResetMultipleForAllRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ResetMultipleForAllPlayers: Resets scores for the leaderboards with
@@ -2175,6 +2464,14 @@
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 *ScoresResetMultipleForAllPlayersCall) Context(ctx context.Context) *ScoresResetMultipleForAllPlayersCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ScoresResetMultipleForAllPlayersCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.scoresresetmultipleforallrequest)
@@ -2193,6 +2490,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2227,6 +2527,7 @@
type TurnBasedMatchesResetCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Reset: Reset all turn-based match data for a user. This method is
@@ -2244,6 +2545,14 @@
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 *TurnBasedMatchesResetCall) Context(ctx context.Context) *TurnBasedMatchesResetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TurnBasedMatchesResetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2256,6 +2565,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2287,6 +2599,7 @@
type TurnBasedMatchesResetForAllPlayersCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ResetForAllPlayers: Deletes turn-based matches where the only match
@@ -2306,6 +2619,14 @@
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 *TurnBasedMatchesResetForAllPlayersCall) Context(ctx context.Context) *TurnBasedMatchesResetForAllPlayersCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TurnBasedMatchesResetForAllPlayersCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2318,6 +2639,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/gan/v1beta1/gan-gen.go b/gan/v1beta1/gan-gen.go
index 177a501..7b219d3 100644
--- a/gan/v1beta1/gan-gen.go
+++ b/gan/v1beta1/gan-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "gan:v1beta1"
const apiName = "gan"
@@ -858,6 +858,7 @@
role string
roleId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves data about a single advertiser if that the requesting
@@ -886,6 +887,14 @@
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 *AdvertisersGetCall) Context(ctx context.Context) *AdvertisersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertisersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -904,6 +913,9 @@
"roleId": c.roleId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -971,6 +983,7 @@
role string
roleId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves data about all advertisers that the requesting
@@ -1060,6 +1073,14 @@
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 *AdvertisersListCall) Context(ctx context.Context) *AdvertisersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AdvertisersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1096,6 +1117,9 @@
"roleId": c.roleId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1214,6 +1238,7 @@
s *Service
publisher string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves credit card offers for the given publisher.
@@ -1251,6 +1276,14 @@
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 *CcOffersListCall) Context(ctx context.Context) *CcOffersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CcOffersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1271,6 +1304,9 @@
"publisher": c.publisher,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1337,6 +1373,7 @@
role string
roleId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves event data for a given advertiser/publisher.
@@ -1513,6 +1550,14 @@
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 *EventsListCall) Context(ctx context.Context) *EventsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *EventsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1576,6 +1621,9 @@
"roleId": c.roleId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1756,6 +1804,7 @@
roleId string
linkId int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves data about a single link if the requesting
@@ -1778,6 +1827,14 @@
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 *LinksGetCall) Context(ctx context.Context) *LinksGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LinksGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1794,6 +1851,9 @@
"linkId": strconv.FormatInt(c.linkId, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1865,6 +1925,7 @@
roleId string
link *Link
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new link.
@@ -1884,6 +1945,14 @@
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 *LinksInsertCall) Context(ctx context.Context) *LinksInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LinksInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.link)
@@ -1905,6 +1974,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1970,6 +2042,7 @@
role string
roleId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves all links that match the query parameters.
@@ -2099,6 +2172,14 @@
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 *LinksListCall) Context(ctx context.Context) *LinksListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LinksListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2153,6 +2234,9 @@
"roleId": c.roleId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2325,6 +2409,7 @@
role string
roleId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves data about a single advertiser if that the requesting
@@ -2353,6 +2438,14 @@
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 *PublishersGetCall) Context(ctx context.Context) *PublishersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PublishersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2371,6 +2464,9 @@
"roleId": c.roleId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2438,6 +2534,7 @@
role string
roleId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves data about all publishers that the requesting
@@ -2528,6 +2625,14 @@
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 *PublishersListCall) Context(ctx context.Context) *PublishersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PublishersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2564,6 +2669,9 @@
"roleId": c.roleId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2684,6 +2792,7 @@
roleId string
reportType string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a report of the specified type.
@@ -2794,6 +2903,14 @@
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 *ReportsGetCall) Context(ctx context.Context) *ReportsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2843,6 +2960,9 @@
"reportType": c.reportType,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/genomics/v1/genomics-gen.go b/genomics/v1/genomics-gen.go
index e4a1a80..1570b0e 100644
--- a/genomics/v1/genomics-gen.go
+++ b/genomics/v1/genomics-gen.go
@@ -13,6 +13,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -32,7 +33,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "genomics:v1"
const apiName = "genomics"
@@ -1545,6 +1545,7 @@
s *Service
callset *CallSet
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a new call set.
@@ -1562,6 +1563,14 @@
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 *CallsetsCreateCall) Context(ctx context.Context) *CallsetsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CallsetsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.callset)
@@ -1580,6 +1589,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1622,6 +1634,7 @@
s *Service
callSetId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a call set.
@@ -1639,6 +1652,14 @@
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 *CallsetsDeleteCall) Context(ctx context.Context) *CallsetsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CallsetsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1653,6 +1674,9 @@
"callSetId": c.callSetId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1703,6 +1727,7 @@
s *Service
callSetId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a call set by ID.
@@ -1720,6 +1745,14 @@
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 *CallsetsGetCall) Context(ctx context.Context) *CallsetsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CallsetsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1734,6 +1767,9 @@
"callSetId": c.callSetId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1786,6 +1822,7 @@
callSetId string
callset *CallSet
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a call set. This method supports patch semantics.
@@ -1813,6 +1850,14 @@
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 *CallsetsPatchCall) Context(ctx context.Context) *CallsetsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CallsetsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.callset)
@@ -1836,6 +1881,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1894,6 +1942,7 @@
s *Service
searchcallsetsrequest *SearchCallSetsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Search: Gets a list of call sets matching the criteria. Implements
@@ -1913,6 +1962,14 @@
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 *CallsetsSearchCall) Context(ctx context.Context) *CallsetsSearchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CallsetsSearchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchcallsetsrequest)
@@ -1931,6 +1988,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1974,6 +2034,7 @@
s *Service
dataset *Dataset
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a new dataset.
@@ -1991,6 +2052,14 @@
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 *DatasetsCreateCall) Context(ctx context.Context) *DatasetsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.dataset)
@@ -2009,6 +2078,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2051,6 +2123,7 @@
s *Service
datasetId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a dataset.
@@ -2068,6 +2141,14 @@
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 *DatasetsDeleteCall) Context(ctx context.Context) *DatasetsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2082,6 +2163,9 @@
"datasetId": c.datasetId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2132,6 +2216,7 @@
s *Service
datasetId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a dataset by ID.
@@ -2149,6 +2234,14 @@
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 *DatasetsGetCall) Context(ctx context.Context) *DatasetsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2163,6 +2256,9 @@
"datasetId": c.datasetId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2215,6 +2311,7 @@
resource string
getiampolicyrequest *GetIamPolicyRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetIamPolicy: Gets the access control policy for the dataset. Is
@@ -2235,6 +2332,14 @@
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 *DatasetsGetIamPolicyCall) Context(ctx context.Context) *DatasetsGetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
@@ -2255,6 +2360,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2308,6 +2416,7 @@
type DatasetsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists datasets within a project.
@@ -2348,6 +2457,14 @@
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 *DatasetsListCall) Context(ctx context.Context) *DatasetsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2369,6 +2486,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2428,6 +2548,7 @@
datasetId string
dataset *Dataset
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a dataset. This method supports patch semantics.
@@ -2455,6 +2576,14 @@
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 *DatasetsPatchCall) Context(ctx context.Context) *DatasetsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.dataset)
@@ -2478,6 +2607,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2537,6 +2669,7 @@
resource string
setiampolicyrequest *SetIamPolicyRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetIamPolicy: Sets the access control policy on the specified
@@ -2557,6 +2690,14 @@
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 *DatasetsSetIamPolicyCall) Context(ctx context.Context) *DatasetsSetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
@@ -2577,6 +2718,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2632,6 +2776,7 @@
resource string
testiampermissionsrequest *TestIamPermissionsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// TestIamPermissions: Returns permissions that a caller has on the
@@ -2651,6 +2796,14 @@
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 *DatasetsTestIamPermissionsCall) Context(ctx context.Context) *DatasetsTestIamPermissionsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
@@ -2671,6 +2824,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2726,6 +2882,7 @@
datasetId string
undeletedatasetrequest *UndeleteDatasetRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Undelete: Undeletes a dataset by restoring a dataset which was
@@ -2746,6 +2903,14 @@
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 *DatasetsUndeleteCall) Context(ctx context.Context) *DatasetsUndeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsUndeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletedatasetrequest)
@@ -2766,6 +2931,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2820,6 +2988,7 @@
name string
canceloperationrequest *CancelOperationRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Cancel: Starts asynchronous cancellation on a long-running operation.
@@ -2842,6 +3011,14 @@
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 *OperationsCancelCall) Context(ctx context.Context) *OperationsCancelCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OperationsCancelCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
@@ -2862,6 +3039,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2916,6 +3096,7 @@
s *Service
name string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: This method is not implemented. To cancel an operation,
@@ -2934,6 +3115,14 @@
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 *OperationsDeleteCall) Context(ctx context.Context) *OperationsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2948,6 +3137,9 @@
"name": c.name,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2999,6 +3191,7 @@
s *Service
name string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the latest state of a long-running operation. Clients can
@@ -3018,6 +3211,14 @@
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 *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3032,6 +3233,9 @@
"name": c.name,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3083,6 +3287,7 @@
s *Service
name string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists operations that match the specified filter in the
@@ -3128,6 +3333,14 @@
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 *OperationsListCall) Context(ctx context.Context) *OperationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3151,6 +3364,9 @@
"name": c.name,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3218,6 +3434,7 @@
s *Service
readGroupSetId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a read group set.
@@ -3235,6 +3452,14 @@
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 *ReadgroupsetsDeleteCall) Context(ctx context.Context) *ReadgroupsetsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReadgroupsetsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3249,6 +3474,9 @@
"readGroupSetId": c.readGroupSetId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3300,6 +3528,7 @@
readGroupSetId string
exportreadgroupsetrequest *ExportReadGroupSetRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Export: Exports a read group set to a BAM file in Google Cloud
@@ -3323,6 +3552,14 @@
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 *ReadgroupsetsExportCall) Context(ctx context.Context) *ReadgroupsetsExportCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReadgroupsetsExportCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportreadgroupsetrequest)
@@ -3343,6 +3580,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3397,6 +3637,7 @@
s *Service
readGroupSetId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a read group set by ID.
@@ -3414,6 +3655,14 @@
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 *ReadgroupsetsGetCall) Context(ctx context.Context) *ReadgroupsetsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReadgroupsetsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3428,6 +3677,9 @@
"readGroupSetId": c.readGroupSetId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3479,6 +3731,7 @@
s *Service
importreadgroupsetsrequest *ImportReadGroupSetsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Import: Creates read group sets by asynchronously importing the
@@ -3506,6 +3759,14 @@
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 *ReadgroupsetsImportCall) Context(ctx context.Context) *ReadgroupsetsImportCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReadgroupsetsImportCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.importreadgroupsetsrequest)
@@ -3524,6 +3785,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3568,6 +3832,7 @@
readGroupSetId string
readgroupset *ReadGroupSet
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a read group set. This method supports patch
@@ -3596,6 +3861,14 @@
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 *ReadgroupsetsPatchCall) Context(ctx context.Context) *ReadgroupsetsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReadgroupsetsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.readgroupset)
@@ -3619,6 +3892,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3677,6 +3953,7 @@
s *Service
searchreadgroupsetsrequest *SearchReadGroupSetsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Search: Searches for read group sets matching the criteria.
@@ -3697,6 +3974,14 @@
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 *ReadgroupsetsSearchCall) Context(ctx context.Context) *ReadgroupsetsSearchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReadgroupsetsSearchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchreadgroupsetsrequest)
@@ -3715,6 +4000,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3758,6 +4046,7 @@
s *Service
readGroupSetId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists fixed width coverage buckets for a read group set, each
@@ -3837,6 +4126,14 @@
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 *ReadgroupsetsCoveragebucketsListCall) Context(ctx context.Context) *ReadgroupsetsCoveragebucketsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReadgroupsetsCoveragebucketsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3869,6 +4166,9 @@
"readGroupSetId": c.readGroupSetId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3954,6 +4254,7 @@
s *Service
searchreadsrequest *SearchReadsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Search: Gets a list of reads for one or more read group sets. Reads
@@ -3983,6 +4284,14 @@
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 *ReadsSearchCall) Context(ctx context.Context) *ReadsSearchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReadsSearchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchreadsrequest)
@@ -4001,6 +4310,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4044,6 +4356,7 @@
s *Service
referenceId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a reference. Implements
@@ -4063,6 +4376,14 @@
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 *ReferencesGetCall) Context(ctx context.Context) *ReferencesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReferencesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4077,6 +4398,9 @@
"referenceId": c.referenceId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4128,6 +4452,7 @@
s *Service
searchreferencesrequest *SearchReferencesRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Search: Searches for references which match the given criteria.
@@ -4148,6 +4473,14 @@
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 *ReferencesSearchCall) Context(ctx context.Context) *ReferencesSearchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReferencesSearchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchreferencesrequest)
@@ -4166,6 +4499,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4209,6 +4545,7 @@
s *Service
referenceId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the bases in a reference, optionally restricted to a
@@ -4259,6 +4596,14 @@
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 *ReferencesBasesListCall) Context(ctx context.Context) *ReferencesBasesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReferencesBasesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4285,6 +4630,9 @@
"referenceId": c.referenceId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4359,6 +4707,7 @@
s *Service
referenceSetId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a reference set. Implements
@@ -4378,6 +4727,14 @@
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 *ReferencesetsGetCall) Context(ctx context.Context) *ReferencesetsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReferencesetsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4392,6 +4749,9 @@
"referenceSetId": c.referenceSetId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4443,6 +4803,7 @@
s *Service
searchreferencesetsrequest *SearchReferenceSetsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Search: Searches for reference sets which match the given criteria.
@@ -4463,6 +4824,14 @@
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 *ReferencesetsSearchCall) Context(ctx context.Context) *ReferencesetsSearchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReferencesetsSearchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchreferencesetsrequest)
@@ -4481,6 +4850,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4524,6 +4896,7 @@
s *Service
variant *Variant
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a new variant.
@@ -4541,6 +4914,14 @@
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 *VariantsCreateCall) Context(ctx context.Context) *VariantsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VariantsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.variant)
@@ -4559,6 +4940,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4601,6 +4985,7 @@
s *Service
variantId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a variant.
@@ -4618,6 +5003,14 @@
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 *VariantsDeleteCall) Context(ctx context.Context) *VariantsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VariantsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4632,6 +5025,9 @@
"variantId": c.variantId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4682,6 +5078,7 @@
s *Service
variantId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a variant by ID.
@@ -4699,6 +5096,14 @@
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 *VariantsGetCall) Context(ctx context.Context) *VariantsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VariantsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4713,6 +5118,9 @@
"variantId": c.variantId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4764,6 +5172,7 @@
s *Service
importvariantsrequest *ImportVariantsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Import: Creates variant data by asynchronously importing the provided
@@ -4792,6 +5201,14 @@
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 *VariantsImportCall) Context(ctx context.Context) *VariantsImportCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VariantsImportCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.importvariantsrequest)
@@ -4810,6 +5227,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4854,6 +5274,7 @@
variantId string
variant *Variant
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a variant. This method supports patch semantics.
@@ -4882,6 +5303,14 @@
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 *VariantsPatchCall) Context(ctx context.Context) *VariantsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VariantsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.variant)
@@ -4905,6 +5334,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4963,6 +5395,7 @@
s *Service
searchvariantsrequest *SearchVariantsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Search: Gets a list of variants matching the criteria. Implements
@@ -4982,6 +5415,14 @@
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 *VariantsSearchCall) Context(ctx context.Context) *VariantsSearchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VariantsSearchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchvariantsrequest)
@@ -5000,6 +5441,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5043,6 +5487,7 @@
s *Service
variantset *VariantSet
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a new variant set. The provided variant set must have
@@ -5062,6 +5507,14 @@
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 *VariantsetsCreateCall) Context(ctx context.Context) *VariantsetsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VariantsetsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.variantset)
@@ -5080,6 +5533,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5122,6 +5578,7 @@
s *Service
variantSetId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the contents of a variant set. The variant set object
@@ -5140,6 +5597,14 @@
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 *VariantsetsDeleteCall) Context(ctx context.Context) *VariantsetsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VariantsetsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5154,6 +5619,9 @@
"variantSetId": c.variantSetId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5205,6 +5673,7 @@
variantSetId string
exportvariantsetrequest *ExportVariantSetRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Export: Exports variant set data to an external destination.
@@ -5223,6 +5692,14 @@
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 *VariantsetsExportCall) Context(ctx context.Context) *VariantsetsExportCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VariantsetsExportCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportvariantsetrequest)
@@ -5243,6 +5720,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5297,6 +5777,7 @@
s *Service
variantSetId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a variant set by ID.
@@ -5314,6 +5795,14 @@
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 *VariantsetsGetCall) Context(ctx context.Context) *VariantsetsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VariantsetsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5328,6 +5817,9 @@
"variantSetId": c.variantSetId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5380,6 +5872,7 @@
variantSetId string
variantset *VariantSet
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a variant set. This method supports patch semantics.
@@ -5407,6 +5900,14 @@
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 *VariantsetsPatchCall) Context(ctx context.Context) *VariantsetsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VariantsetsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.variantset)
@@ -5430,6 +5931,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5488,6 +5992,7 @@
s *Service
searchvariantsetsrequest *SearchVariantSetsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Search: Returns a list of all variant sets matching search criteria.
@@ -5508,6 +6013,14 @@
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 *VariantsetsSearchCall) Context(ctx context.Context) *VariantsetsSearchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VariantsetsSearchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchvariantsetsrequest)
@@ -5526,6 +6039,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/genomics/v1beta2/genomics-gen.go b/genomics/v1beta2/genomics-gen.go
index b99eb10..054fa67 100644
--- a/genomics/v1beta2/genomics-gen.go
+++ b/genomics/v1beta2/genomics-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "genomics:v1beta2"
const apiName = "genomics"
@@ -2044,6 +2044,7 @@
s *Service
annotationset *AnnotationSet
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a new annotation set. Caller must have WRITE
@@ -2062,6 +2063,14 @@
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 *AnnotationSetsCreateCall) Context(ctx context.Context) *AnnotationSetsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AnnotationSetsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotationset)
@@ -2080,6 +2089,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2122,6 +2134,7 @@
s *Service
annotationSetId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an annotation set. Caller must have WRITE permission
@@ -2140,6 +2153,14 @@
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 *AnnotationSetsDeleteCall) Context(ctx context.Context) *AnnotationSetsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AnnotationSetsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2154,6 +2175,9 @@
"annotationSetId": c.annotationSetId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2197,6 +2221,7 @@
s *Service
annotationSetId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets an annotation set. Caller must have READ permission for the
@@ -2215,6 +2240,14 @@
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 *AnnotationSetsGetCall) Context(ctx context.Context) *AnnotationSetsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AnnotationSetsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2229,6 +2262,9 @@
"annotationSetId": c.annotationSetId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2281,6 +2317,7 @@
annotationSetId string
annotationset *AnnotationSet
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an annotation set. The update must respect all
@@ -2302,6 +2339,14 @@
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 *AnnotationSetsPatchCall) Context(ctx context.Context) *AnnotationSetsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AnnotationSetsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotationset)
@@ -2322,6 +2367,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2375,6 +2423,7 @@
s *Service
searchannotationsetsrequest *SearchAnnotationSetsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Search: Searches for annotation sets that match the given criteria.
@@ -2394,6 +2443,14 @@
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 *AnnotationSetsSearchCall) Context(ctx context.Context) *AnnotationSetsSearchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AnnotationSetsSearchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchannotationsetsrequest)
@@ -2412,6 +2469,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2456,6 +2516,7 @@
annotationSetId string
annotationset *AnnotationSet
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an annotation set. The update must respect all
@@ -2477,6 +2538,14 @@
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 *AnnotationSetsUpdateCall) Context(ctx context.Context) *AnnotationSetsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AnnotationSetsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotationset)
@@ -2497,6 +2566,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2550,6 +2622,7 @@
s *Service
batchcreateannotationsrequest *BatchCreateAnnotationsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchCreate: Creates one or more new annotations atomically. All
@@ -2577,6 +2650,14 @@
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 *AnnotationsBatchCreateCall) Context(ctx context.Context) *AnnotationsBatchCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AnnotationsBatchCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchcreateannotationsrequest)
@@ -2595,6 +2676,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2637,6 +2721,7 @@
s *Service
annotation *Annotation
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a new annotation. Caller must have WRITE permission
@@ -2655,6 +2740,14 @@
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 *AnnotationsCreateCall) Context(ctx context.Context) *AnnotationsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AnnotationsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotation)
@@ -2673,6 +2766,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2715,6 +2811,7 @@
s *Service
annotationId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an annotation. Caller must have WRITE permission for
@@ -2733,6 +2830,14 @@
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 *AnnotationsDeleteCall) Context(ctx context.Context) *AnnotationsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AnnotationsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2747,6 +2852,9 @@
"annotationId": c.annotationId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2790,6 +2898,7 @@
s *Service
annotationId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets an annotation. Caller must have READ permission for the
@@ -2808,6 +2917,14 @@
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 *AnnotationsGetCall) Context(ctx context.Context) *AnnotationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AnnotationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2822,6 +2939,9 @@
"annotationId": c.annotationId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2874,6 +2994,7 @@
annotationId string
annotation *Annotation
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an annotation. The update must respect all mutability
@@ -2895,6 +3016,14 @@
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 *AnnotationsPatchCall) Context(ctx context.Context) *AnnotationsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AnnotationsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotation)
@@ -2915,6 +3044,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2968,6 +3100,7 @@
s *Service
searchannotationsrequest *SearchAnnotationsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Search: Searches for annotations that match the given criteria.
@@ -2988,6 +3121,14 @@
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 *AnnotationsSearchCall) Context(ctx context.Context) *AnnotationsSearchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AnnotationsSearchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchannotationsrequest)
@@ -3006,6 +3147,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3050,6 +3194,7 @@
annotationId string
annotation *Annotation
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an annotation. The update must respect all mutability
@@ -3071,6 +3216,14 @@
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 *AnnotationsUpdateCall) Context(ctx context.Context) *AnnotationsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AnnotationsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotation)
@@ -3091,6 +3244,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3144,6 +3300,7 @@
s *Service
callset *CallSet
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a new call set.
@@ -3161,6 +3318,14 @@
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 *CallsetsCreateCall) Context(ctx context.Context) *CallsetsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CallsetsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.callset)
@@ -3179,6 +3344,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3221,6 +3389,7 @@
s *Service
callSetId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a call set.
@@ -3238,6 +3407,14 @@
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 *CallsetsDeleteCall) Context(ctx context.Context) *CallsetsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CallsetsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3252,6 +3429,9 @@
"callSetId": c.callSetId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3295,6 +3475,7 @@
s *Service
callSetId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a call set by ID.
@@ -3312,6 +3493,14 @@
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 *CallsetsGetCall) Context(ctx context.Context) *CallsetsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CallsetsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3326,6 +3515,9 @@
"callSetId": c.callSetId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3378,6 +3570,7 @@
callSetId string
callset *CallSet
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a call set. This method supports patch semantics.
@@ -3396,6 +3589,14 @@
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 *CallsetsPatchCall) Context(ctx context.Context) *CallsetsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CallsetsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.callset)
@@ -3416,6 +3617,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3469,6 +3673,7 @@
s *Service
searchcallsetsrequest *SearchCallSetsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Search: Gets a list of call sets matching the criteria.
@@ -3488,6 +3693,14 @@
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 *CallsetsSearchCall) Context(ctx context.Context) *CallsetsSearchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CallsetsSearchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchcallsetsrequest)
@@ -3506,6 +3719,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3550,6 +3766,7 @@
callSetId string
callset *CallSet
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a call set.
@@ -3568,6 +3785,14 @@
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 *CallsetsUpdateCall) Context(ctx context.Context) *CallsetsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CallsetsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.callset)
@@ -3588,6 +3813,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3641,6 +3869,7 @@
s *Service
dataset *Dataset
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a new dataset.
@@ -3658,6 +3887,14 @@
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 *DatasetsCreateCall) Context(ctx context.Context) *DatasetsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.dataset)
@@ -3676,6 +3913,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3718,6 +3958,7 @@
s *Service
datasetId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a dataset.
@@ -3735,6 +3976,14 @@
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 *DatasetsDeleteCall) Context(ctx context.Context) *DatasetsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3749,6 +3998,9 @@
"datasetId": c.datasetId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3792,6 +4044,7 @@
s *Service
datasetId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a dataset by ID.
@@ -3809,6 +4062,14 @@
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 *DatasetsGetCall) Context(ctx context.Context) *DatasetsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3823,6 +4084,9 @@
"datasetId": c.datasetId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3873,6 +4137,7 @@
type DatasetsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists datasets within a project.
@@ -3912,6 +4177,14 @@
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 *DatasetsListCall) Context(ctx context.Context) *DatasetsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3933,6 +4206,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3993,6 +4269,7 @@
datasetId string
dataset *Dataset
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a dataset. This method supports patch semantics.
@@ -4011,6 +4288,14 @@
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 *DatasetsPatchCall) Context(ctx context.Context) *DatasetsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.dataset)
@@ -4031,6 +4316,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4084,6 +4372,7 @@
s *Service
datasetId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Undelete: Undeletes a dataset by restoring a dataset which was
@@ -4103,6 +4392,14 @@
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 *DatasetsUndeleteCall) Context(ctx context.Context) *DatasetsUndeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsUndeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4117,6 +4414,9 @@
"datasetId": c.datasetId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4168,6 +4468,7 @@
datasetId string
dataset *Dataset
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a dataset.
@@ -4186,6 +4487,14 @@
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 *DatasetsUpdateCall) Context(ctx context.Context) *DatasetsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatasetsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.dataset)
@@ -4206,6 +4515,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4259,6 +4571,7 @@
s *Service
experimentalcreatejobrequest *ExperimentalCreateJobRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates and asynchronously runs an ad-hoc job. This is an
@@ -4277,6 +4590,14 @@
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 *ExperimentalJobsCreateCall) Context(ctx context.Context) *ExperimentalJobsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ExperimentalJobsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.experimentalcreatejobrequest)
@@ -4295,6 +4616,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4338,6 +4662,7 @@
s *Service
jobId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Cancel: Cancels a job by ID. Note that it is possible for partial
@@ -4356,6 +4681,14 @@
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 *JobsCancelCall) Context(ctx context.Context) *JobsCancelCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *JobsCancelCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4370,6 +4703,9 @@
"jobId": c.jobId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4413,6 +4749,7 @@
s *Service
jobId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a job by ID.
@@ -4430,6 +4767,14 @@
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 *JobsGetCall) Context(ctx context.Context) *JobsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *JobsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4444,6 +4789,9 @@
"jobId": c.jobId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4495,6 +4843,7 @@
s *Service
searchjobsrequest *SearchJobsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Search: Gets a list of jobs matching the criteria.
@@ -4512,6 +4861,14 @@
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 *JobsSearchCall) Context(ctx context.Context) *JobsSearchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *JobsSearchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchjobsrequest)
@@ -4530,6 +4887,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4573,6 +4933,7 @@
s *Service
alignreadgroupsetsrequest *AlignReadGroupSetsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Align: Aligns read data from existing read group sets or files from
@@ -4592,6 +4953,14 @@
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 *ReadgroupsetsAlignCall) Context(ctx context.Context) *ReadgroupsetsAlignCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReadgroupsetsAlignCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.alignreadgroupsetsrequest)
@@ -4610,6 +4979,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4653,6 +5025,7 @@
s *Service
callreadgroupsetsrequest *CallReadGroupSetsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Call: Calls variants on read data from existing read group sets or
@@ -4672,6 +5045,14 @@
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 *ReadgroupsetsCallCall) Context(ctx context.Context) *ReadgroupsetsCallCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReadgroupsetsCallCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.callreadgroupsetsrequest)
@@ -4690,6 +5071,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4733,6 +5117,7 @@
s *Service
readGroupSetId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a read group set.
@@ -4750,6 +5135,14 @@
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 *ReadgroupsetsDeleteCall) Context(ctx context.Context) *ReadgroupsetsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReadgroupsetsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4764,6 +5157,9 @@
"readGroupSetId": c.readGroupSetId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4807,6 +5203,7 @@
s *Service
exportreadgroupsetsrequest *ExportReadGroupSetsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Export: Exports read group sets to a BAM file in Google Cloud
@@ -4829,6 +5226,14 @@
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 *ReadgroupsetsExportCall) Context(ctx context.Context) *ReadgroupsetsExportCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReadgroupsetsExportCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportreadgroupsetsrequest)
@@ -4847,6 +5252,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4890,6 +5298,7 @@
s *Service
readGroupSetId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a read group set by ID.
@@ -4907,6 +5316,14 @@
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 *ReadgroupsetsGetCall) Context(ctx context.Context) *ReadgroupsetsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReadgroupsetsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4921,6 +5338,9 @@
"readGroupSetId": c.readGroupSetId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4972,6 +5392,7 @@
s *Service
importreadgroupsetsrequest *ImportReadGroupSetsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Import: Creates read group sets by asynchronously importing the
@@ -5000,6 +5421,14 @@
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 *ReadgroupsetsImportCall) Context(ctx context.Context) *ReadgroupsetsImportCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReadgroupsetsImportCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.importreadgroupsetsrequest)
@@ -5018,6 +5447,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5062,6 +5494,7 @@
readGroupSetId string
readgroupset *ReadGroupSet
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a read group set. This method supports patch
@@ -5081,6 +5514,14 @@
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 *ReadgroupsetsPatchCall) Context(ctx context.Context) *ReadgroupsetsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReadgroupsetsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.readgroupset)
@@ -5101,6 +5542,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5154,6 +5598,7 @@
s *Service
searchreadgroupsetsrequest *SearchReadGroupSetsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Search: Searches for read group sets matching the
@@ -5174,6 +5619,14 @@
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 *ReadgroupsetsSearchCall) Context(ctx context.Context) *ReadgroupsetsSearchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReadgroupsetsSearchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchreadgroupsetsrequest)
@@ -5192,6 +5645,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5236,6 +5692,7 @@
readGroupSetId string
readgroupset *ReadGroupSet
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a read group set.
@@ -5254,6 +5711,14 @@
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 *ReadgroupsetsUpdateCall) Context(ctx context.Context) *ReadgroupsetsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReadgroupsetsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.readgroupset)
@@ -5274,6 +5739,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5327,6 +5795,7 @@
s *Service
readGroupSetId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists fixed width coverage buckets for a read group set, each
@@ -5406,6 +5875,14 @@
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 *ReadgroupsetsCoveragebucketsListCall) Context(ctx context.Context) *ReadgroupsetsCoveragebucketsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReadgroupsetsCoveragebucketsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5438,6 +5915,9 @@
"readGroupSetId": c.readGroupSetId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5523,6 +6003,7 @@
s *Service
searchreadsrequest *SearchReadsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Search: Gets a list of reads for one or more read group sets. Reads
@@ -5555,6 +6036,14 @@
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 *ReadsSearchCall) Context(ctx context.Context) *ReadsSearchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReadsSearchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchreadsrequest)
@@ -5573,6 +6062,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5616,6 +6108,7 @@
s *Service
referenceId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a reference.
@@ -5635,6 +6128,14 @@
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 *ReferencesGetCall) Context(ctx context.Context) *ReferencesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReferencesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5649,6 +6150,9 @@
"referenceId": c.referenceId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5700,6 +6204,7 @@
s *Service
searchreferencesrequest *SearchReferencesRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Search: Searches for references which match the given
@@ -5720,6 +6225,14 @@
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 *ReferencesSearchCall) Context(ctx context.Context) *ReferencesSearchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReferencesSearchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchreferencesrequest)
@@ -5738,6 +6251,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5781,6 +6297,7 @@
s *Service
referenceId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the bases in a reference, optionally restricted to a
@@ -5831,6 +6348,14 @@
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 *ReferencesBasesListCall) Context(ctx context.Context) *ReferencesBasesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReferencesBasesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5857,6 +6382,9 @@
"referenceId": c.referenceId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5931,6 +6459,7 @@
s *Service
referenceSetId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a reference set.
@@ -5950,6 +6479,14 @@
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 *ReferencesetsGetCall) Context(ctx context.Context) *ReferencesetsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReferencesetsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5964,6 +6501,9 @@
"referenceSetId": c.referenceSetId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6015,6 +6555,7 @@
s *Service
searchreferencesetsrequest *SearchReferenceSetsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Search: Searches for reference sets which match the given
@@ -6035,6 +6576,14 @@
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 *ReferencesetsSearchCall) Context(ctx context.Context) *ReferencesetsSearchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReferencesetsSearchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchreferencesetsrequest)
@@ -6053,6 +6602,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6096,6 +6648,7 @@
s *Service
variant *Variant
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a new variant.
@@ -6113,6 +6666,14 @@
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 *VariantsCreateCall) Context(ctx context.Context) *VariantsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VariantsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.variant)
@@ -6131,6 +6692,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6173,6 +6737,7 @@
s *Service
variantId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a variant.
@@ -6190,6 +6755,14 @@
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 *VariantsDeleteCall) Context(ctx context.Context) *VariantsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VariantsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6204,6 +6777,9 @@
"variantId": c.variantId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6247,6 +6823,7 @@
s *Service
variantId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a variant by ID.
@@ -6264,6 +6841,14 @@
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 *VariantsGetCall) Context(ctx context.Context) *VariantsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VariantsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6278,6 +6863,9 @@
"variantId": c.variantId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6329,6 +6917,7 @@
s *Service
searchvariantsrequest *SearchVariantsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Search: Gets a list of variants matching the criteria.
@@ -6348,6 +6937,14 @@
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 *VariantsSearchCall) Context(ctx context.Context) *VariantsSearchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VariantsSearchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchvariantsrequest)
@@ -6366,6 +6963,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6410,6 +7010,7 @@
variantId string
variant *Variant
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a variant's names and info fields. All other
@@ -6430,6 +7031,14 @@
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 *VariantsUpdateCall) Context(ctx context.Context) *VariantsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VariantsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.variant)
@@ -6450,6 +7059,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6503,6 +7115,7 @@
s *Service
variantset *VariantSet
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a new variant set (only necessary in v1).
@@ -6524,6 +7137,14 @@
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 *VariantsetsCreateCall) Context(ctx context.Context) *VariantsetsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VariantsetsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.variantset)
@@ -6542,6 +7163,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6580,6 +7204,7 @@
s *Service
variantSetId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the contents of a variant set. The variant set object
@@ -6598,6 +7223,14 @@
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 *VariantsetsDeleteCall) Context(ctx context.Context) *VariantsetsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VariantsetsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6612,6 +7245,9 @@
"variantSetId": c.variantSetId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6656,6 +7292,7 @@
variantSetId string
exportvariantsetrequest *ExportVariantSetRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Export: Exports variant set data to an external destination.
@@ -6674,6 +7311,14 @@
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 *VariantsetsExportCall) Context(ctx context.Context) *VariantsetsExportCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VariantsetsExportCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportvariantsetrequest)
@@ -6694,6 +7339,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6748,6 +7396,7 @@
s *Service
variantSetId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a variant set by ID.
@@ -6765,6 +7414,14 @@
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 *VariantsetsGetCall) Context(ctx context.Context) *VariantsetsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VariantsetsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6779,6 +7436,9 @@
"variantSetId": c.variantSetId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6831,6 +7491,7 @@
variantSetId string
importvariantsrequest *ImportVariantsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ImportVariants: Creates variant data by asynchronously importing the
@@ -6859,6 +7520,14 @@
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 *VariantsetsImportVariantsCall) Context(ctx context.Context) *VariantsetsImportVariantsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VariantsetsImportVariantsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.importvariantsrequest)
@@ -6879,6 +7548,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6934,6 +7606,7 @@
variantSetId string
mergevariantsrequest *MergeVariantsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// MergeVariants: Merges the given variants with existing variants. Each
@@ -6959,6 +7632,14 @@
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 *VariantsetsMergeVariantsCall) Context(ctx context.Context) *VariantsetsMergeVariantsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VariantsetsMergeVariantsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.mergevariantsrequest)
@@ -6979,6 +7660,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7026,6 +7710,7 @@
variantSetId string
variantset *VariantSet
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a variant set's metadata. All other modifications are
@@ -7045,6 +7730,14 @@
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 *VariantsetsPatchCall) Context(ctx context.Context) *VariantsetsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VariantsetsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.variantset)
@@ -7065,6 +7758,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7118,6 +7814,7 @@
s *Service
searchvariantsetsrequest *SearchVariantSetsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Search: Returns a list of all variant sets matching search
@@ -7138,6 +7835,14 @@
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 *VariantsetsSearchCall) Context(ctx context.Context) *VariantsetsSearchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VariantsetsSearchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchvariantsetsrequest)
@@ -7156,6 +7861,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7200,6 +7908,7 @@
variantSetId string
variantset *VariantSet
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a variant set's metadata. All other modifications are
@@ -7219,6 +7928,14 @@
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 *VariantsetsUpdateCall) Context(ctx context.Context) *VariantsetsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VariantsetsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.variantset)
@@ -7239,6 +7956,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/gmail/v1/gmail-gen.go b/gmail/v1/gmail-gen.go
index 0893a45..1fa005c 100644
--- a/gmail/v1/gmail-gen.go
+++ b/gmail/v1/gmail-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "gmail:v1"
const apiName = "gmail"
@@ -527,6 +527,7 @@
s *Service
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetProfile: Gets the current user's Gmail profile.
@@ -544,6 +545,14 @@
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 *UsersGetProfileCall) Context(ctx context.Context) *UsersGetProfileCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersGetProfileCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -558,6 +567,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -611,6 +623,7 @@
s *Service
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Stop: Stop receiving push notifications for the given user mailbox.
@@ -628,6 +641,14 @@
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 *UsersStopCall) Context(ctx context.Context) *UsersStopCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersStopCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -642,6 +663,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -688,6 +712,7 @@
userId string
watchrequest *WatchRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Watch: Set up or update a push notification watch on the given user
@@ -707,6 +732,14 @@
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 *UsersWatchCall) Context(ctx context.Context) *UsersWatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersWatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.watchrequest)
@@ -727,6 +760,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -786,8 +822,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Create: Creates a new draft with the DRAFT label.
@@ -806,10 +842,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *UsersDraftsCreateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *UsersDraftsCreateCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -834,6 +872,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *UsersDraftsCreateCall) Context(ctx context.Context) *UsersDraftsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersDraftsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.draft)
@@ -873,6 +921,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -969,6 +1020,7 @@
userId string
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Immediately and permanently deletes the specified draft. Does
@@ -988,6 +1040,14 @@
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 *UsersDraftsDeleteCall) Context(ctx context.Context) *UsersDraftsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersDraftsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1003,6 +1063,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1056,6 +1119,7 @@
userId string
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the specified draft.
@@ -1087,6 +1151,14 @@
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 *UsersDraftsGetCall) Context(ctx context.Context) *UsersDraftsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersDraftsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1105,6 +1177,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1183,6 +1258,7 @@
s *Service
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the drafts in the user's mailbox.
@@ -1214,6 +1290,14 @@
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 *UsersDraftsListCall) Context(ctx context.Context) *UsersDraftsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersDraftsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1234,6 +1318,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1303,8 +1390,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Send: Sends the specified, existing draft to the recipients in the
@@ -1324,10 +1411,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *UsersDraftsSendCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *UsersDraftsSendCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -1352,6 +1441,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *UsersDraftsSendCall) Context(ctx context.Context) *UsersDraftsSendCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersDraftsSendCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.draft)
@@ -1391,6 +1490,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1491,8 +1593,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Update: Replaces a draft's content.
@@ -1512,10 +1614,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *UsersDraftsUpdateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *UsersDraftsUpdateCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -1540,6 +1644,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *UsersDraftsUpdateCall) Context(ctx context.Context) *UsersDraftsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersDraftsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.draft)
@@ -1580,6 +1694,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1682,6 +1799,7 @@
s *Service
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the history of all changes to the given mailbox. History
@@ -1738,6 +1856,14 @@
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 *UsersHistoryListCall) Context(ctx context.Context) *UsersHistoryListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersHistoryListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1764,6 +1890,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1840,6 +1969,7 @@
userId string
label *Label
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a new label.
@@ -1858,6 +1988,14 @@
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 *UsersLabelsCreateCall) Context(ctx context.Context) *UsersLabelsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersLabelsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.label)
@@ -1878,6 +2016,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1934,6 +2075,7 @@
userId string
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Immediately and permanently deletes the specified label and
@@ -1953,6 +2095,14 @@
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 *UsersLabelsDeleteCall) Context(ctx context.Context) *UsersLabelsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersLabelsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1968,6 +2118,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2021,6 +2174,7 @@
userId string
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the specified label.
@@ -2039,6 +2193,14 @@
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 *UsersLabelsGetCall) Context(ctx context.Context) *UsersLabelsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersLabelsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2054,6 +2216,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2114,6 +2279,7 @@
s *Service
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all labels in the user's mailbox.
@@ -2131,6 +2297,14 @@
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 *UsersLabelsListCall) Context(ctx context.Context) *UsersLabelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersLabelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2145,6 +2319,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2200,6 +2377,7 @@
id string
label *Label
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates the specified label. This method supports patch
@@ -2220,6 +2398,14 @@
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 *UsersLabelsPatchCall) Context(ctx context.Context) *UsersLabelsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersLabelsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.label)
@@ -2241,6 +2427,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2305,6 +2494,7 @@
id string
label *Label
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates the specified label.
@@ -2324,6 +2514,14 @@
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 *UsersLabelsUpdateCall) Context(ctx context.Context) *UsersLabelsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersLabelsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.label)
@@ -2345,6 +2543,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2408,6 +2609,7 @@
userId string
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Immediately and permanently deletes the specified message.
@@ -2427,6 +2629,14 @@
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 *UsersMessagesDeleteCall) Context(ctx context.Context) *UsersMessagesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersMessagesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2442,6 +2652,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2493,6 +2706,7 @@
userId string
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the specified message.
@@ -2531,6 +2745,14 @@
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 *UsersMessagesGetCall) Context(ctx context.Context) *UsersMessagesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersMessagesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2552,6 +2774,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2639,8 +2864,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Import: Imports a message into only this user's mailbox, with
@@ -2697,10 +2922,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *UsersMessagesImportCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *UsersMessagesImportCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -2725,6 +2952,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *UsersMessagesImportCall) Context(ctx context.Context) *UsersMessagesImportCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersMessagesImportCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.message)
@@ -2776,6 +3013,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2907,8 +3147,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Insert: Directly inserts a message into only this user's mailbox
@@ -2949,10 +3189,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *UsersMessagesInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *UsersMessagesInsertCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -2977,6 +3219,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *UsersMessagesInsertCall) Context(ctx context.Context) *UsersMessagesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersMessagesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.message)
@@ -3022,6 +3274,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3137,6 +3392,7 @@
s *Service
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the messages in the user's mailbox.
@@ -3190,6 +3446,14 @@
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 *UsersMessagesListCall) Context(ctx context.Context) *UsersMessagesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersMessagesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3219,6 +3483,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3302,6 +3569,7 @@
id string
modifymessagerequest *ModifyMessageRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Modify: Modifies the labels on the specified message.
@@ -3321,6 +3589,14 @@
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 *UsersMessagesModifyCall) Context(ctx context.Context) *UsersMessagesModifyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersMessagesModifyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.modifymessagerequest)
@@ -3342,6 +3618,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3407,8 +3686,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Send: Sends the specified message to the recipients in the To, Cc,
@@ -3428,10 +3707,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *UsersMessagesSendCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *UsersMessagesSendCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -3456,6 +3737,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *UsersMessagesSendCall) Context(ctx context.Context) *UsersMessagesSendCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersMessagesSendCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.message)
@@ -3495,6 +3786,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3592,6 +3886,7 @@
userId string
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Trash: Moves the specified message to the trash.
@@ -3610,6 +3905,14 @@
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 *UsersMessagesTrashCall) Context(ctx context.Context) *UsersMessagesTrashCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersMessagesTrashCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3625,6 +3928,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3684,6 +3990,7 @@
userId string
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Untrash: Removes the specified message from the trash.
@@ -3702,6 +4009,14 @@
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 *UsersMessagesUntrashCall) Context(ctx context.Context) *UsersMessagesUntrashCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersMessagesUntrashCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3717,6 +4032,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3777,6 +4095,7 @@
messageId string
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the specified message attachment.
@@ -3796,6 +4115,14 @@
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 *UsersMessagesAttachmentsGetCall) Context(ctx context.Context) *UsersMessagesAttachmentsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersMessagesAttachmentsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3812,6 +4139,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3879,6 +4209,7 @@
userId string
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Immediately and permanently deletes the specified thread.
@@ -3898,6 +4229,14 @@
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 *UsersThreadsDeleteCall) Context(ctx context.Context) *UsersThreadsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersThreadsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3913,6 +4252,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3964,6 +4306,7 @@
userId string
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the specified thread.
@@ -4001,6 +4344,14 @@
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 *UsersThreadsGetCall) Context(ctx context.Context) *UsersThreadsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersThreadsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4022,6 +4373,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4103,6 +4457,7 @@
s *Service
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the threads in the user's mailbox.
@@ -4156,6 +4511,14 @@
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 *UsersThreadsListCall) Context(ctx context.Context) *UsersThreadsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersThreadsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4185,6 +4548,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4268,6 +4634,7 @@
id string
modifythreadrequest *ModifyThreadRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Modify: Modifies the labels applied to the thread. This applies to
@@ -4288,6 +4655,14 @@
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 *UsersThreadsModifyCall) Context(ctx context.Context) *UsersThreadsModifyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersThreadsModifyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.modifythreadrequest)
@@ -4309,6 +4684,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4371,6 +4749,7 @@
userId string
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Trash: Moves the specified thread to the trash.
@@ -4389,6 +4768,14 @@
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 *UsersThreadsTrashCall) Context(ctx context.Context) *UsersThreadsTrashCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersThreadsTrashCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4404,6 +4791,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4463,6 +4853,7 @@
userId string
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Untrash: Removes the specified thread from the trash.
@@ -4481,6 +4872,14 @@
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 *UsersThreadsUntrashCall) Context(ctx context.Context) *UsersThreadsUntrashCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersThreadsUntrashCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4496,6 +4895,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/google-api-go-generator/gen.go b/google-api-go-generator/gen.go
index 5f48c1b..c465bb7 100644
--- a/google-api-go-generator/gen.go
+++ b/google-api-go-generator/gen.go
@@ -17,6 +17,7 @@
"net/url"
"os"
"os/exec"
+ "path"
"path/filepath"
"regexp"
"sort"
@@ -492,6 +493,7 @@
"strconv",
"strings",
*contextPkg,
+ path.Join(*contextPkg, "ctxhttp"),
} {
p("\t%q\n", pkg)
}
@@ -507,7 +509,6 @@
pn("var _ = googleapi.Version")
pn("var _ = errors.New")
pn("var _ = strings.Replace")
- pn("var _ = context.Background")
pn("")
pn("const apiId = %q", jstr(m, "id"))
pn("const apiName = %q", jstr(m, "name"))
@@ -1455,9 +1456,9 @@
p("\tmedia_ io.Reader\n")
p("\tresumable_ googleapi.SizeReaderAt\n")
p("\tmediaType_ string\n")
- p("\tctx_ context.Context\n")
p("\tprotocol_ string\n")
}
+ p("\tctx_ context.Context\n")
p("}\n")
p("\n%s", asComment("", methodName+": "+jstr(meth.m, "description")))
@@ -1507,10 +1508,12 @@
pn(`c.protocol_ = "multipart"`)
pn("return c")
pn("}")
- pn("\n// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.")
+ pn("\n// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.")
pn("// At most one of Media and ResumableMedia may be set.")
pn(`// mediaType identifies the MIME media type of the upload, such as "image/png".`)
pn(`// If mediaType is "", it will be auto-detected.`)
+ pn(`// The provided ctx will supersede any context previously provided to `)
+ pn(`// the Context method.`)
pn("func (c *%s) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *%s {", callName, callName)
pn("c.ctx_ = ctx")
pn("c.resumable_ = io.NewSectionReader(r, 0, size)")
@@ -1535,6 +1538,22 @@
pn("return c")
pn("}")
+ doMethod := "Do method"
+ if meth.supportsMediaDownload() {
+ doMethod = "Do and Download methods"
+ }
+ pn("\n// Context sets the context to be used in this call's %s.", doMethod)
+ pn("// Any pending HTTP request will be aborted if the provided context")
+ pn("// is canceled.")
+ if meth.supportsMediaUpload() {
+ pn("// This context will supersede any context previously provided to ")
+ pn("// the ResumableMedia method.")
+ }
+ pn("func (c *%s) Context(ctx context.Context) *%s {", callName, callName)
+ pn(`c.ctx_ = ctx`)
+ pn("return c")
+ pn("}")
+
pn("\nfunc (c *%s) doRequest(alt string) (*http.Response, error) {", callName)
pn("var body io.Reader = nil")
hasContentType := false
@@ -1617,6 +1636,9 @@
pn(`req.Header.Set("Content-Type", ctype)`)
}
pn(`req.Header.Set("User-Agent", c.s.userAgent())`)
+ pn("if c.ctx_ != nil {")
+ pn(" return ctxhttp.Do(c.ctx_, c.s.client, req)")
+ pn("}")
pn("return c.s.client.Do(req)")
pn("}")
diff --git a/google-api-go-generator/testdata/any.want b/google-api-go-generator/testdata/any.want
index 1e599bb..9bceafc 100644
--- a/google-api-go-generator/testdata/any.want
+++ b/google-api-go-generator/testdata/any.want
@@ -13,6 +13,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -32,7 +33,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "logging:v1beta3"
const apiName = "logging"
@@ -407,6 +407,7 @@
s *Service
projectsId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists log services associated with log entries ingested for a
@@ -450,6 +451,14 @@
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 *ProjectsLogServicesListCall) Context(ctx context.Context) *ProjectsLogServicesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsLogServicesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -473,6 +482,9 @@
"projectsId": c.projectsId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -539,6 +551,7 @@
projectsId string
logServicesId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists log service indexes associated with a log service.
@@ -608,6 +621,14 @@
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 *ProjectsLogServicesIndexesListCall) Context(ctx context.Context) *ProjectsLogServicesIndexesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsLogServicesIndexesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -638,6 +659,9 @@
"logServicesId": c.logServicesId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -723,6 +747,7 @@
logServicesId string
logsink *LogSink
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates the specified log service sink resource.
@@ -742,6 +767,14 @@
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 *ProjectsLogServicesSinksCreateCall) Context(ctx context.Context) *ProjectsLogServicesSinksCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsLogServicesSinksCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
@@ -763,6 +796,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -824,6 +860,7 @@
logServicesId string
sinksId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified log service sink.
@@ -843,6 +880,14 @@
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 *ProjectsLogServicesSinksDeleteCall) Context(ctx context.Context) *ProjectsLogServicesSinksDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsLogServicesSinksDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -859,6 +904,9 @@
"sinksId": c.sinksId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -924,6 +972,7 @@
logServicesId string
sinksId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the specified log service sink resource.
@@ -943,6 +992,14 @@
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 *ProjectsLogServicesSinksGetCall) Context(ctx context.Context) *ProjectsLogServicesSinksGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsLogServicesSinksGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -959,6 +1016,9 @@
"sinksId": c.sinksId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1023,6 +1083,7 @@
projectsId string
logServicesId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists log service sinks associated with the specified service.
@@ -1041,6 +1102,14 @@
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 *ProjectsLogServicesSinksListCall) Context(ctx context.Context) *ProjectsLogServicesSinksListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsLogServicesSinksListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1056,6 +1125,9 @@
"logServicesId": c.logServicesId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1115,6 +1187,7 @@
sinksId string
logsink *LogSink
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Creates or update the specified log service sink resource.
@@ -1135,6 +1208,14 @@
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 *ProjectsLogServicesSinksUpdateCall) Context(ctx context.Context) *ProjectsLogServicesSinksUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsLogServicesSinksUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
@@ -1157,6 +1238,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1224,6 +1308,7 @@
projectsId string
logsId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified log resource and all log entries
@@ -1243,6 +1328,14 @@
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 *ProjectsLogsDeleteCall) Context(ctx context.Context) *ProjectsLogsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsLogsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1258,6 +1351,9 @@
"logsId": c.logsId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1314,6 +1410,7 @@
s *Service
projectsId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists log resources belonging to the specified project.
@@ -1372,6 +1469,14 @@
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 *ProjectsLogsListCall) Context(ctx context.Context) *ProjectsLogsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsLogsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1398,6 +1503,9 @@
"projectsId": c.projectsId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1470,6 +1578,7 @@
logsId string
writelogentriesrequest *WriteLogEntriesRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Write: Creates one or more log entries in a log. You must supply a
@@ -1496,6 +1605,14 @@
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 *ProjectsLogsEntriesWriteCall) Context(ctx context.Context) *ProjectsLogsEntriesWriteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsLogsEntriesWriteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.writelogentriesrequest)
@@ -1517,6 +1634,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1578,6 +1698,7 @@
logsId string
logsink *LogSink
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates the specified log sink resource.
@@ -1597,6 +1718,14 @@
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 *ProjectsLogsSinksCreateCall) Context(ctx context.Context) *ProjectsLogsSinksCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsLogsSinksCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
@@ -1618,6 +1747,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1679,6 +1811,7 @@
logsId string
sinksId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified log sink resource.
@@ -1698,6 +1831,14 @@
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 *ProjectsLogsSinksDeleteCall) Context(ctx context.Context) *ProjectsLogsSinksDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsLogsSinksDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1714,6 +1855,9 @@
"sinksId": c.sinksId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1779,6 +1923,7 @@
logsId string
sinksId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the specified log sink resource.
@@ -1798,6 +1943,14 @@
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 *ProjectsLogsSinksGetCall) Context(ctx context.Context) *ProjectsLogsSinksGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsLogsSinksGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1814,6 +1967,9 @@
"sinksId": c.sinksId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1878,6 +2034,7 @@
projectsId string
logsId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists log sinks associated with the specified log.
@@ -1896,6 +2053,14 @@
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 *ProjectsLogsSinksListCall) Context(ctx context.Context) *ProjectsLogsSinksListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsLogsSinksListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1911,6 +2076,9 @@
"logsId": c.logsId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1970,6 +2138,7 @@
sinksId string
logsink *LogSink
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Creates or updates the specified log sink resource.
@@ -1990,6 +2159,14 @@
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 *ProjectsLogsSinksUpdateCall) Context(ctx context.Context) *ProjectsLogsSinksUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsLogsSinksUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
@@ -2012,6 +2189,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/google-api-go-generator/testdata/arrayofarray-1.want b/google-api-go-generator/testdata/arrayofarray-1.want
index 14f2313..0ed599e 100644
--- a/google-api-go-generator/testdata/arrayofarray-1.want
+++ b/google-api-go-generator/testdata/arrayofarray-1.want
@@ -13,6 +13,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -32,7 +33,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "arrayofarray:v1"
const apiName = "arrayofarray"
diff --git a/google-api-go-generator/testdata/arrayofenum.want b/google-api-go-generator/testdata/arrayofenum.want
index c3a5b0c..5794baf 100644
--- a/google-api-go-generator/testdata/arrayofenum.want
+++ b/google-api-go-generator/testdata/arrayofenum.want
@@ -13,6 +13,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -32,7 +33,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "arrayofenum:v1"
const apiName = "arrayofenum"
diff --git a/google-api-go-generator/testdata/arrayofmapofobjects.want b/google-api-go-generator/testdata/arrayofmapofobjects.want
index 348f0d8..63382fd 100644
--- a/google-api-go-generator/testdata/arrayofmapofobjects.want
+++ b/google-api-go-generator/testdata/arrayofmapofobjects.want
@@ -13,6 +13,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -32,7 +33,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "arrayofmapofstrings:v1"
const apiName = "arrayofmapofstrings"
diff --git a/google-api-go-generator/testdata/arrayofmapofstrings.want b/google-api-go-generator/testdata/arrayofmapofstrings.want
index 3d61eae..94554e9 100644
--- a/google-api-go-generator/testdata/arrayofmapofstrings.want
+++ b/google-api-go-generator/testdata/arrayofmapofstrings.want
@@ -13,6 +13,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -32,7 +33,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "arrayofmapofstrings:v1"
const apiName = "arrayofmapofstrings"
diff --git a/google-api-go-generator/testdata/blogger-3.want b/google-api-go-generator/testdata/blogger-3.want
index 8281037..c4f13c6 100644
--- a/google-api-go-generator/testdata/blogger-3.want
+++ b/google-api-go-generator/testdata/blogger-3.want
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "blogger:v3"
const apiName = "blogger"
@@ -681,6 +681,7 @@
userId string
blogId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one blog and user info pair by blogId and userId.
@@ -706,6 +707,14 @@
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 *BlogUserInfosGetCall) Context(ctx context.Context) *BlogUserInfosGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BlogUserInfosGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -724,6 +733,9 @@
"blogId": c.blogId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -787,6 +799,7 @@
s *Service
blogId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one blog by id.
@@ -811,6 +824,14 @@
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 *BlogsGetCall) Context(ctx context.Context) *BlogsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BlogsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -828,6 +849,9 @@
"blogId": c.blogId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -884,6 +908,7 @@
s *Service
url string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetByUrl: Retrieve a Blog by URL.
@@ -901,6 +926,14 @@
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 *BlogsGetByUrlCall) Context(ctx context.Context) *BlogsGetByUrlCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BlogsGetByUrlCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -914,6 +947,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -964,6 +1000,7 @@
s *Service
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ListByUser: Retrieves a list of blogs, possibly filtered.
@@ -1000,6 +1037,14 @@
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 *BlogsListByUserCall) Context(ctx context.Context) *BlogsListByUserCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BlogsListByUserCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1020,6 +1065,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1091,6 +1139,7 @@
postId string
commentId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Approve: Marks a comment as not spam.
@@ -1110,6 +1159,14 @@
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 *CommentsApproveCall) Context(ctx context.Context) *CommentsApproveCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsApproveCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1126,6 +1183,9 @@
"commentId": c.commentId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1191,6 +1251,7 @@
postId string
commentId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a comment by id.
@@ -1210,6 +1271,14 @@
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 *CommentsDeleteCall) Context(ctx context.Context) *CommentsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1226,6 +1295,9 @@
"commentId": c.commentId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1284,6 +1356,7 @@
postId string
commentId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one comment by id.
@@ -1303,6 +1376,14 @@
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 *CommentsGetCall) Context(ctx context.Context) *CommentsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1319,6 +1400,9 @@
"commentId": c.commentId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1384,6 +1468,7 @@
blogId string
postId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the comments for a post, possibly filtered.
@@ -1460,6 +1545,14 @@
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 *CommentsListCall) Context(ctx context.Context) *CommentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1496,6 +1589,9 @@
"postId": c.postId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1612,6 +1708,7 @@
s *Service
blogId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ListByBlog: Retrieves the comments for a blog, across all posts,
@@ -1665,6 +1762,14 @@
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 *CommentsListByBlogCall) Context(ctx context.Context) *CommentsListByBlogCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsListByBlogCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1694,6 +1799,9 @@
"blogId": c.blogId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1774,6 +1882,7 @@
postId string
commentId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// MarkAsSpam: Marks a comment as spam.
@@ -1793,6 +1902,14 @@
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 *CommentsMarkAsSpamCall) Context(ctx context.Context) *CommentsMarkAsSpamCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsMarkAsSpamCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1809,6 +1926,9 @@
"commentId": c.commentId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1874,6 +1994,7 @@
postId string
commentId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// RemoveContent: Removes the content of a comment.
@@ -1893,6 +2014,14 @@
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 *CommentsRemoveContentCall) Context(ctx context.Context) *CommentsRemoveContentCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsRemoveContentCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1909,6 +2038,9 @@
"commentId": c.commentId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1972,6 +2104,7 @@
s *Service
blogId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieve pageview stats for a Blog.
@@ -2000,6 +2133,14 @@
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 *PageViewsGetCall) Context(ctx context.Context) *PageViewsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PageViewsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2017,6 +2158,9 @@
"blogId": c.blogId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2082,6 +2226,7 @@
blogId string
pageId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a page by id.
@@ -2100,6 +2245,14 @@
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 *PagesDeleteCall) Context(ctx context.Context) *PagesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PagesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2115,6 +2268,9 @@
"pageId": c.pageId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2165,6 +2321,7 @@
blogId string
pageId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one blog page by id.
@@ -2194,6 +2351,14 @@
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 *PagesGetCall) Context(ctx context.Context) *PagesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PagesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2212,6 +2377,9 @@
"pageId": c.pageId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2284,6 +2452,7 @@
blogId string
page *Page
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Add a page.
@@ -2302,6 +2471,14 @@
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 *PagesInsertCall) Context(ctx context.Context) *PagesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PagesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.page)
@@ -2322,6 +2499,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2374,6 +2554,7 @@
s *Service
blogId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the pages for a blog, optionally including non-LIVE
@@ -2421,6 +2602,14 @@
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 *PagesListCall) Context(ctx context.Context) *PagesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PagesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2444,6 +2633,9 @@
"blogId": c.blogId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2530,6 +2722,7 @@
pageId string
page *Page
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Update a page. This method supports patch semantics.
@@ -2549,6 +2742,14 @@
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 *PagesPatchCall) Context(ctx context.Context) *PagesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PagesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.page)
@@ -2570,6 +2771,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2631,6 +2835,7 @@
pageId string
page *Page
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Update a page.
@@ -2650,6 +2855,14 @@
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 *PagesUpdateCall) Context(ctx context.Context) *PagesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PagesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.page)
@@ -2671,6 +2884,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2732,6 +2948,7 @@
blogId string
postId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one post and user info pair by postId and userId.
@@ -2758,6 +2975,14 @@
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 *PostUserInfosGetCall) Context(ctx context.Context) *PostUserInfosGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostUserInfosGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2777,6 +3002,9 @@
"postId": c.postId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2848,6 +3076,7 @@
userId string
blogId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of post and user info pairs, possibly
@@ -2941,6 +3170,14 @@
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 *PostUserInfosListCall) Context(ctx context.Context) *PostUserInfosListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostUserInfosListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2983,6 +3220,9 @@
"blogId": c.blogId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3117,6 +3357,7 @@
blogId string
postId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a post by id.
@@ -3135,6 +3376,14 @@
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 *PostsDeleteCall) Context(ctx context.Context) *PostsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3150,6 +3399,9 @@
"postId": c.postId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3200,6 +3452,7 @@
blogId string
postId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get a post by id.
@@ -3236,6 +3489,14 @@
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 *PostsGetCall) Context(ctx context.Context) *PostsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3257,6 +3518,9 @@
"postId": c.postId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3335,6 +3599,7 @@
blogId string
path string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetByPath: Retrieve a Post by Path.
@@ -3371,6 +3636,14 @@
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 *PostsGetByPathCall) Context(ctx context.Context) *PostsGetByPathCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsGetByPathCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3392,6 +3665,9 @@
"blogId": c.blogId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3470,6 +3746,7 @@
blogId string
post *Post
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Add a post.
@@ -3495,6 +3772,14 @@
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 *PostsInsertCall) Context(ctx context.Context) *PostsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.post)
@@ -3518,6 +3803,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3575,6 +3863,7 @@
s *Service
blogId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of posts, possibly filtered.
@@ -3675,6 +3964,14 @@
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 *PostsListCall) Context(ctx context.Context) *PostsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3719,6 +4016,9 @@
"blogId": c.blogId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3853,6 +4153,7 @@
postId string
post *Post
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Update a post. This method supports patch semantics.
@@ -3872,6 +4173,14 @@
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 *PostsPatchCall) Context(ctx context.Context) *PostsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.post)
@@ -3893,6 +4202,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3953,6 +4265,7 @@
blogId string
postId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Publish: Publish a draft post.
@@ -3978,6 +4291,14 @@
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 *PostsPublishCall) Context(ctx context.Context) *PostsPublishCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsPublishCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3996,6 +4317,9 @@
"postId": c.postId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4059,6 +4383,7 @@
blogId string
postId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Revert: Revert a published or scheduled post to draft state.
@@ -4077,6 +4402,14 @@
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 *PostsRevertCall) Context(ctx context.Context) *PostsRevertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsRevertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4092,6 +4425,9 @@
"postId": c.postId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4149,6 +4485,7 @@
blogId string
q string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Search: Search for a post.
@@ -4186,6 +4523,14 @@
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 *PostsSearchCall) Context(ctx context.Context) *PostsSearchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsSearchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4207,6 +4552,9 @@
"blogId": c.blogId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4286,6 +4634,7 @@
postId string
post *Post
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Update a post.
@@ -4305,6 +4654,14 @@
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 *PostsUpdateCall) Context(ctx context.Context) *PostsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.post)
@@ -4326,6 +4683,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4385,6 +4745,7 @@
s *Service
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one user by id.
@@ -4402,6 +4763,14 @@
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 *UsersGetCall) Context(ctx context.Context) *UsersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4416,6 +4785,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/google-api-go-generator/testdata/getwithoutbody.want b/google-api-go-generator/testdata/getwithoutbody.want
index 90996b6..cb90c5e 100644
--- a/google-api-go-generator/testdata/getwithoutbody.want
+++ b/google-api-go-generator/testdata/getwithoutbody.want
@@ -13,6 +13,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -32,7 +33,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "getwithoutbody:v1"
const apiName = "getwithoutbody"
@@ -101,6 +101,7 @@
project string
listmetricrequest *ListMetricRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all of the available metric descriptors. Large number of
@@ -139,6 +140,14 @@
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 *MetricDescriptorsListCall) Context(ctx context.Context) *MetricDescriptorsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MetricDescriptorsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -159,6 +168,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/google-api-go-generator/testdata/mapofany.want b/google-api-go-generator/testdata/mapofany.want
index 79ca6ed..d399b25 100644
--- a/google-api-go-generator/testdata/mapofany.want
+++ b/google-api-go-generator/testdata/mapofany.want
@@ -13,6 +13,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -32,7 +33,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "mapofany:v1"
const apiName = "mapofany"
diff --git a/google-api-go-generator/testdata/mapofarrayofobjects.want b/google-api-go-generator/testdata/mapofarrayofobjects.want
index db22374..e16f7de 100644
--- a/google-api-go-generator/testdata/mapofarrayofobjects.want
+++ b/google-api-go-generator/testdata/mapofarrayofobjects.want
@@ -13,6 +13,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -32,7 +33,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "additionalprops:v1"
const apiName = "additionalprops"
@@ -93,6 +93,7 @@
type AtlasGetMapCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetMap: Get a map.
@@ -109,6 +110,14 @@
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 *AtlasGetMapCall) Context(ctx context.Context) *AtlasGetMapCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AtlasGetMapCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -121,6 +130,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/google-api-go-generator/testdata/mapofobjects.want b/google-api-go-generator/testdata/mapofobjects.want
index 8db3828..a2d1a5d 100644
--- a/google-api-go-generator/testdata/mapofobjects.want
+++ b/google-api-go-generator/testdata/mapofobjects.want
@@ -13,6 +13,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -32,7 +33,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "additionalpropsobjs:v1"
const apiName = "additionalpropsobjs"
diff --git a/google-api-go-generator/testdata/mapofstrings-1.want b/google-api-go-generator/testdata/mapofstrings-1.want
index ef8b818..61cc0e7 100644
--- a/google-api-go-generator/testdata/mapofstrings-1.want
+++ b/google-api-go-generator/testdata/mapofstrings-1.want
@@ -13,6 +13,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -32,7 +33,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "additionalprops:v1"
const apiName = "additionalprops"
@@ -93,6 +93,7 @@
type AtlasGetMapCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetMap: Get a map.
@@ -109,6 +110,14 @@
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 *AtlasGetMapCall) Context(ctx context.Context) *AtlasGetMapCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AtlasGetMapCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -121,6 +130,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/google-api-go-generator/testdata/quotednum.want b/google-api-go-generator/testdata/quotednum.want
index 880ba58..3d134b9 100644
--- a/google-api-go-generator/testdata/quotednum.want
+++ b/google-api-go-generator/testdata/quotednum.want
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "adexchangebuyer:v1.1"
const apiName = "adexchangebuyer"
diff --git a/google-api-go-generator/testdata/resource-named-service.want b/google-api-go-generator/testdata/resource-named-service.want
index 6756f3b..46f3ca6 100644
--- a/google-api-go-generator/testdata/resource-named-service.want
+++ b/google-api-go-generator/testdata/resource-named-service.want
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "blogger:v3"
const apiName = "blogger"
@@ -681,6 +681,7 @@
userId string
blogId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one blog and user info pair by blogId and userId.
@@ -706,6 +707,14 @@
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 *BlogUserInfosGetCall) Context(ctx context.Context) *BlogUserInfosGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BlogUserInfosGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -724,6 +733,9 @@
"blogId": c.blogId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -787,6 +799,7 @@
s *Service
blogId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one blog by id.
@@ -811,6 +824,14 @@
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 *BlogsGetCall) Context(ctx context.Context) *BlogsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BlogsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -828,6 +849,9 @@
"blogId": c.blogId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -884,6 +908,7 @@
s *Service
url string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetByUrl: Retrieve a Blog by URL.
@@ -901,6 +926,14 @@
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 *BlogsGetByUrlCall) Context(ctx context.Context) *BlogsGetByUrlCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BlogsGetByUrlCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -914,6 +947,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -964,6 +1000,7 @@
s *Service
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ListByUser: Retrieves a list of blogs, possibly filtered.
@@ -1000,6 +1037,14 @@
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 *BlogsListByUserCall) Context(ctx context.Context) *BlogsListByUserCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BlogsListByUserCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1020,6 +1065,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1091,6 +1139,7 @@
postId string
commentId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Approve: Marks a comment as not spam.
@@ -1110,6 +1159,14 @@
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 *CommentsApproveCall) Context(ctx context.Context) *CommentsApproveCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsApproveCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1126,6 +1183,9 @@
"commentId": c.commentId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1191,6 +1251,7 @@
postId string
commentId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a comment by id.
@@ -1210,6 +1271,14 @@
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 *CommentsDeleteCall) Context(ctx context.Context) *CommentsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1226,6 +1295,9 @@
"commentId": c.commentId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1284,6 +1356,7 @@
postId string
commentId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one comment by id.
@@ -1303,6 +1376,14 @@
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 *CommentsGetCall) Context(ctx context.Context) *CommentsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1319,6 +1400,9 @@
"commentId": c.commentId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1384,6 +1468,7 @@
blogId string
postId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the comments for a post, possibly filtered.
@@ -1460,6 +1545,14 @@
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 *CommentsListCall) Context(ctx context.Context) *CommentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1496,6 +1589,9 @@
"postId": c.postId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1612,6 +1708,7 @@
s *Service
blogId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ListByBlog: Retrieves the comments for a blog, across all posts,
@@ -1665,6 +1762,14 @@
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 *CommentsListByBlogCall) Context(ctx context.Context) *CommentsListByBlogCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsListByBlogCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1694,6 +1799,9 @@
"blogId": c.blogId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1774,6 +1882,7 @@
postId string
commentId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// MarkAsSpam: Marks a comment as spam.
@@ -1793,6 +1902,14 @@
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 *CommentsMarkAsSpamCall) Context(ctx context.Context) *CommentsMarkAsSpamCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsMarkAsSpamCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1809,6 +1926,9 @@
"commentId": c.commentId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1874,6 +1994,7 @@
postId string
commentId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// RemoveContent: Removes the content of a comment.
@@ -1893,6 +2014,14 @@
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 *CommentsRemoveContentCall) Context(ctx context.Context) *CommentsRemoveContentCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsRemoveContentCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1909,6 +2038,9 @@
"commentId": c.commentId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1972,6 +2104,7 @@
s *Service
blogId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieve pageview stats for a Blog.
@@ -2000,6 +2133,14 @@
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 *PageViewsGetCall) Context(ctx context.Context) *PageViewsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PageViewsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2017,6 +2158,9 @@
"blogId": c.blogId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2082,6 +2226,7 @@
blogId string
pageId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a page by id.
@@ -2100,6 +2245,14 @@
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 *PagesDeleteCall) Context(ctx context.Context) *PagesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PagesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2115,6 +2268,9 @@
"pageId": c.pageId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2165,6 +2321,7 @@
blogId string
pageId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one blog page by id.
@@ -2194,6 +2351,14 @@
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 *PagesGetCall) Context(ctx context.Context) *PagesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PagesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2212,6 +2377,9 @@
"pageId": c.pageId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2284,6 +2452,7 @@
blogId string
page *Page
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Add a page.
@@ -2302,6 +2471,14 @@
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 *PagesInsertCall) Context(ctx context.Context) *PagesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PagesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.page)
@@ -2322,6 +2499,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2374,6 +2554,7 @@
s *Service
blogId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the pages for a blog, optionally including non-LIVE
@@ -2421,6 +2602,14 @@
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 *PagesListCall) Context(ctx context.Context) *PagesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PagesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2444,6 +2633,9 @@
"blogId": c.blogId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2530,6 +2722,7 @@
pageId string
page *Page
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Update a page. This method supports patch semantics.
@@ -2549,6 +2742,14 @@
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 *PagesPatchCall) Context(ctx context.Context) *PagesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PagesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.page)
@@ -2570,6 +2771,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2631,6 +2835,7 @@
pageId string
page *Page
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Update a page.
@@ -2650,6 +2855,14 @@
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 *PagesUpdateCall) Context(ctx context.Context) *PagesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PagesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.page)
@@ -2671,6 +2884,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2732,6 +2948,7 @@
blogId string
postId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one post and user info pair by postId and userId.
@@ -2758,6 +2975,14 @@
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 *PostUserInfosGetCall) Context(ctx context.Context) *PostUserInfosGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostUserInfosGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2777,6 +3002,9 @@
"postId": c.postId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2848,6 +3076,7 @@
userId string
blogId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of post and user info pairs, possibly
@@ -2941,6 +3170,14 @@
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 *PostUserInfosListCall) Context(ctx context.Context) *PostUserInfosListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostUserInfosListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2983,6 +3220,9 @@
"blogId": c.blogId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3117,6 +3357,7 @@
blogId string
postId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a post by id.
@@ -3135,6 +3376,14 @@
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 *PostsDeleteCall) Context(ctx context.Context) *PostsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3150,6 +3399,9 @@
"postId": c.postId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3200,6 +3452,7 @@
blogId string
postId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get a post by id.
@@ -3236,6 +3489,14 @@
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 *PostsGetCall) Context(ctx context.Context) *PostsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3257,6 +3518,9 @@
"postId": c.postId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3335,6 +3599,7 @@
blogId string
path string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetByPath: Retrieve a Post by Path.
@@ -3371,6 +3636,14 @@
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 *PostsGetByPathCall) Context(ctx context.Context) *PostsGetByPathCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsGetByPathCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3392,6 +3665,9 @@
"blogId": c.blogId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3470,6 +3746,7 @@
blogId string
post *Post
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Add a post.
@@ -3495,6 +3772,14 @@
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 *PostsInsertCall) Context(ctx context.Context) *PostsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.post)
@@ -3518,6 +3803,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3575,6 +3863,7 @@
s *Service
blogId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of posts, possibly filtered.
@@ -3675,6 +3964,14 @@
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 *PostsListCall) Context(ctx context.Context) *PostsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3719,6 +4016,9 @@
"blogId": c.blogId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3853,6 +4153,7 @@
postId string
post *Post
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Update a post. This method supports patch semantics.
@@ -3872,6 +4173,14 @@
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 *PostsPatchCall) Context(ctx context.Context) *PostsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.post)
@@ -3893,6 +4202,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3953,6 +4265,7 @@
blogId string
postId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Publish: Publish a draft post.
@@ -3978,6 +4291,14 @@
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 *PostsPublishCall) Context(ctx context.Context) *PostsPublishCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsPublishCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3996,6 +4317,9 @@
"postId": c.postId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4059,6 +4383,7 @@
blogId string
postId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Revert: Revert a published or scheduled post to draft state.
@@ -4077,6 +4402,14 @@
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 *PostsRevertCall) Context(ctx context.Context) *PostsRevertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsRevertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4092,6 +4425,9 @@
"postId": c.postId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4149,6 +4485,7 @@
blogId string
q string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Search: Search for a post.
@@ -4186,6 +4523,14 @@
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 *PostsSearchCall) Context(ctx context.Context) *PostsSearchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsSearchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4207,6 +4552,9 @@
"blogId": c.blogId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4286,6 +4634,7 @@
postId string
post *Post
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Update a post.
@@ -4305,6 +4654,14 @@
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 *PostsUpdateCall) Context(ctx context.Context) *PostsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PostsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.post)
@@ -4326,6 +4683,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4385,6 +4745,7 @@
s *Service
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one user by id.
@@ -4402,6 +4763,14 @@
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 *UsersGetCall) Context(ctx context.Context) *UsersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4416,6 +4785,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/google-api-go-generator/testdata/unfortunatedefaults.want b/google-api-go-generator/testdata/unfortunatedefaults.want
index 67c0d7d..a9be16a 100644
--- a/google-api-go-generator/testdata/unfortunatedefaults.want
+++ b/google-api-go-generator/testdata/unfortunatedefaults.want
@@ -13,6 +13,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -32,7 +33,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "wrapnewlines:v1"
const apiName = "wrapnewlines"
diff --git a/google-api-go-generator/testdata/variants.want b/google-api-go-generator/testdata/variants.want
index c588172..d90bda9 100644
--- a/google-api-go-generator/testdata/variants.want
+++ b/google-api-go-generator/testdata/variants.want
@@ -13,6 +13,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -32,7 +33,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "additionalpropsobjs:v1"
const apiName = "additionalpropsobjs"
diff --git a/google-api-go-generator/testdata/wrapnewlines.want b/google-api-go-generator/testdata/wrapnewlines.want
index ed6510e..8f06b63 100644
--- a/google-api-go-generator/testdata/wrapnewlines.want
+++ b/google-api-go-generator/testdata/wrapnewlines.want
@@ -13,6 +13,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -32,7 +33,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "wrapnewlines:v1"
const apiName = "wrapnewlines"
diff --git a/googleapi/googleapi.go b/googleapi/googleapi.go
index 8edbb54..f777019 100644
--- a/googleapi/googleapi.go
+++ b/googleapi/googleapi.go
@@ -24,6 +24,7 @@
"time"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi/internal/uritemplates"
)
@@ -343,12 +344,12 @@
return rx.progress
}
-func (rx *ResumableUpload) transferStatus() (int64, *http.Response, error) {
+func (rx *ResumableUpload) transferStatus(ctx context.Context) (int64, *http.Response, error) {
req, _ := http.NewRequest("POST", rx.URI, nil)
req.ContentLength = 0
req.Header.Set("User-Agent", rx.UserAgent)
req.Header.Set("Content-Range", fmt.Sprintf("bytes */%v", rx.ContentLength))
- res, err := rx.Client.Do(req)
+ res, err := ctxhttp.Do(ctx, rx.Client, req)
if err != nil || res.StatusCode != statusResumeIncomplete {
return 0, res, err
}
@@ -374,7 +375,7 @@
var err error
res := &http.Response{}
if rx.started {
- start, res, err = rx.transferStatus()
+ start, res, err = rx.transferStatus(ctx)
if err != nil || res.StatusCode != statusResumeIncomplete {
return res, err
}
@@ -398,7 +399,7 @@
req.Header.Set("Content-Range", fmt.Sprintf("bytes %v-%v/%v", start, start+reqSize-1, rx.ContentLength))
req.Header.Set("Content-Type", rx.MediaType)
req.Header.Set("User-Agent", rx.UserAgent)
- res, err = rx.Client.Do(req)
+ res, err = ctxhttp.Do(ctx, rx.Client, req)
start += reqSize
if err == nil && (res.StatusCode == statusResumeIncomplete || res.StatusCode == http.StatusOK) {
rx.mu.Lock()
diff --git a/googleapi/googleapi_test.go b/googleapi/googleapi_test.go
index c4989f7..b81bf60 100644
--- a/googleapi/googleapi_test.go
+++ b/googleapi/googleapi_test.go
@@ -429,11 +429,12 @@
}
func TestTransferStatus(t *testing.T) {
+ ctx := context.Background()
for _, tr := range statusTests {
rx := &ResumableUpload{
Client: &http.Client{Transport: tr},
}
- g, _, err := rx.transferStatus()
+ g, _, err := rx.transferStatus(ctx)
if err != nil {
t.Error(err)
}
diff --git a/groupsmigration/v1/groupsmigration-gen.go b/groupsmigration/v1/groupsmigration-gen.go
index d01ef3d..3331c4f 100644
--- a/groupsmigration/v1/groupsmigration-gen.go
+++ b/groupsmigration/v1/groupsmigration-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "groupsmigration:v1"
const apiName = "groupsmigration"
@@ -98,8 +98,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Insert: Inserts a new mail into the archive of the Google group.
@@ -117,10 +117,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will 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
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -145,6 +147,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *ArchiveInsertCall) Context(ctx context.Context) *ArchiveInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ArchiveInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -181,6 +193,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/groupssettings/v1/groupssettings-gen.go b/groupssettings/v1/groupssettings-gen.go
index 5b7b3fb..2ed7b4c 100644
--- a/groupssettings/v1/groupssettings-gen.go
+++ b/groupssettings/v1/groupssettings-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "groupssettings:v1"
const apiName = "groupssettings"
@@ -195,6 +195,7 @@
s *Service
groupUniqueId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets one resource by id.
@@ -212,6 +213,14 @@
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 *GroupsGetCall) Context(ctx context.Context) *GroupsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -226,6 +235,9 @@
"groupUniqueId": c.groupUniqueId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -276,6 +288,7 @@
groupUniqueId string
groups *Groups
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an existing resource. This method supports patch
@@ -295,6 +308,14 @@
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 *GroupsPatchCall) Context(ctx context.Context) *GroupsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.groups)
@@ -315,6 +336,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -368,6 +392,7 @@
groupUniqueId string
groups *Groups
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing resource.
@@ -386,6 +411,14 @@
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 *GroupsUpdateCall) Context(ctx context.Context) *GroupsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.groups)
@@ -406,6 +439,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/identitytoolkit/v3/identitytoolkit-gen.go b/identitytoolkit/v3/identitytoolkit-gen.go
index 1e86545..3163e9e 100644
--- a/identitytoolkit/v3/identitytoolkit-gen.go
+++ b/identitytoolkit/v3/identitytoolkit-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "identitytoolkit:v3"
const apiName = "identitytoolkit"
@@ -637,6 +637,7 @@
s *Service
identitytoolkitrelyingpartycreateauthurirequest *IdentitytoolkitRelyingpartyCreateAuthUriRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// CreateAuthUri: Creates the URI used by the IdP to authenticate the
@@ -655,6 +656,14 @@
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 *RelyingpartyCreateAuthUriCall) Context(ctx context.Context) *RelyingpartyCreateAuthUriCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RelyingpartyCreateAuthUriCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartycreateauthurirequest)
@@ -673,6 +682,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -711,6 +723,7 @@
s *Service
identitytoolkitrelyingpartydeleteaccountrequest *IdentitytoolkitRelyingpartyDeleteAccountRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// DeleteAccount: Delete user account.
@@ -728,6 +741,14 @@
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 *RelyingpartyDeleteAccountCall) Context(ctx context.Context) *RelyingpartyDeleteAccountCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RelyingpartyDeleteAccountCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartydeleteaccountrequest)
@@ -746,6 +767,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -784,6 +808,7 @@
s *Service
identitytoolkitrelyingpartydownloadaccountrequest *IdentitytoolkitRelyingpartyDownloadAccountRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// DownloadAccount: Batch download user accounts.
@@ -801,6 +826,14 @@
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 *RelyingpartyDownloadAccountCall) Context(ctx context.Context) *RelyingpartyDownloadAccountCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RelyingpartyDownloadAccountCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartydownloadaccountrequest)
@@ -819,6 +852,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -857,6 +893,7 @@
s *Service
identitytoolkitrelyingpartygetaccountinforequest *IdentitytoolkitRelyingpartyGetAccountInfoRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetAccountInfo: Returns the account info.
@@ -874,6 +911,14 @@
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 *RelyingpartyGetAccountInfoCall) Context(ctx context.Context) *RelyingpartyGetAccountInfoCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RelyingpartyGetAccountInfoCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartygetaccountinforequest)
@@ -892,6 +937,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -930,6 +978,7 @@
s *Service
relyingparty *Relyingparty
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetOobConfirmationCode: Get a code for user action confirmation.
@@ -947,6 +996,14 @@
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 *RelyingpartyGetOobConfirmationCodeCall) Context(ctx context.Context) *RelyingpartyGetOobConfirmationCodeCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RelyingpartyGetOobConfirmationCodeCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.relyingparty)
@@ -965,6 +1022,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1002,6 +1062,7 @@
type RelyingpartyGetPublicKeysCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetPublicKeys: Get token signing public key.
@@ -1018,6 +1079,14 @@
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 *RelyingpartyGetPublicKeysCall) Context(ctx context.Context) *RelyingpartyGetPublicKeysCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RelyingpartyGetPublicKeysCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1030,6 +1099,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1064,6 +1136,7 @@
type RelyingpartyGetRecaptchaParamCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetRecaptchaParam: Get recaptcha secure param.
@@ -1080,6 +1153,14 @@
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 *RelyingpartyGetRecaptchaParamCall) Context(ctx context.Context) *RelyingpartyGetRecaptchaParamCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RelyingpartyGetRecaptchaParamCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1092,6 +1173,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1127,6 +1211,7 @@
s *Service
identitytoolkitrelyingpartyresetpasswordrequest *IdentitytoolkitRelyingpartyResetPasswordRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ResetPassword: Reset password for a user.
@@ -1144,6 +1229,14 @@
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 *RelyingpartyResetPasswordCall) Context(ctx context.Context) *RelyingpartyResetPasswordCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RelyingpartyResetPasswordCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartyresetpasswordrequest)
@@ -1162,6 +1255,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1200,6 +1296,7 @@
s *Service
identitytoolkitrelyingpartysetaccountinforequest *IdentitytoolkitRelyingpartySetAccountInfoRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetAccountInfo: Set account info for a user.
@@ -1217,6 +1314,14 @@
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 *RelyingpartySetAccountInfoCall) Context(ctx context.Context) *RelyingpartySetAccountInfoCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RelyingpartySetAccountInfoCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartysetaccountinforequest)
@@ -1235,6 +1340,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1273,6 +1381,7 @@
s *Service
identitytoolkitrelyingpartyuploadaccountrequest *IdentitytoolkitRelyingpartyUploadAccountRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// UploadAccount: Batch upload existing user accounts.
@@ -1290,6 +1399,14 @@
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 *RelyingpartyUploadAccountCall) Context(ctx context.Context) *RelyingpartyUploadAccountCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RelyingpartyUploadAccountCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartyuploadaccountrequest)
@@ -1308,6 +1425,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1346,6 +1466,7 @@
s *Service
identitytoolkitrelyingpartyverifyassertionrequest *IdentitytoolkitRelyingpartyVerifyAssertionRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// VerifyAssertion: Verifies the assertion returned by the IdP.
@@ -1363,6 +1484,14 @@
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 *RelyingpartyVerifyAssertionCall) Context(ctx context.Context) *RelyingpartyVerifyAssertionCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RelyingpartyVerifyAssertionCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartyverifyassertionrequest)
@@ -1381,6 +1510,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1419,6 +1551,7 @@
s *Service
identitytoolkitrelyingpartyverifypasswordrequest *IdentitytoolkitRelyingpartyVerifyPasswordRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// VerifyPassword: Verifies the user entered password.
@@ -1436,6 +1569,14 @@
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 *RelyingpartyVerifyPasswordCall) Context(ctx context.Context) *RelyingpartyVerifyPasswordCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RelyingpartyVerifyPasswordCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.identitytoolkitrelyingpartyverifypasswordrequest)
@@ -1454,6 +1595,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/licensing/v1/licensing-gen.go b/licensing/v1/licensing-gen.go
index bbbf9b6..864de12 100644
--- a/licensing/v1/licensing-gen.go
+++ b/licensing/v1/licensing-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "licensing:v1"
const apiName = "licensing"
@@ -134,6 +134,7 @@
skuId string
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Revoke License.
@@ -153,6 +154,14 @@
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 *LicenseAssignmentsDeleteCall) Context(ctx context.Context) *LicenseAssignmentsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LicenseAssignmentsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -169,6 +178,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -227,6 +239,7 @@
skuId string
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get license assignment of a particular product and sku for a
@@ -247,6 +260,14 @@
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 *LicenseAssignmentsGetCall) Context(ctx context.Context) *LicenseAssignmentsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LicenseAssignmentsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -263,6 +284,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -328,6 +352,7 @@
skuId string
licenseassignmentinsert *LicenseAssignmentInsert
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Assign License.
@@ -347,6 +372,14 @@
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 *LicenseAssignmentsInsertCall) Context(ctx context.Context) *LicenseAssignmentsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LicenseAssignmentsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.licenseassignmentinsert)
@@ -368,6 +401,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -428,6 +464,7 @@
productId string
customerId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ListForProduct: List license assignments for given product of the
@@ -462,6 +499,14 @@
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 *LicenseAssignmentsListForProductCall) Context(ctx context.Context) *LicenseAssignmentsListForProductCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LicenseAssignmentsListForProductCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -483,6 +528,9 @@
"productId": c.productId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -556,6 +604,7 @@
skuId string
customerId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ListForProductAndSku: List license assignments for given product and
@@ -591,6 +640,14 @@
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 *LicenseAssignmentsListForProductAndSkuCall) Context(ctx context.Context) *LicenseAssignmentsListForProductAndSkuCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LicenseAssignmentsListForProductAndSkuCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -613,6 +670,9 @@
"skuId": c.skuId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -694,6 +754,7 @@
userId string
licenseassignment *LicenseAssignment
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Assign License. This method supports patch semantics.
@@ -714,6 +775,14 @@
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 *LicenseAssignmentsPatchCall) Context(ctx context.Context) *LicenseAssignmentsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LicenseAssignmentsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.licenseassignment)
@@ -736,6 +805,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -805,6 +877,7 @@
userId string
licenseassignment *LicenseAssignment
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Assign License.
@@ -825,6 +898,14 @@
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 *LicenseAssignmentsUpdateCall) Context(ctx context.Context) *LicenseAssignmentsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LicenseAssignmentsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.licenseassignment)
@@ -847,6 +928,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/logging/v1beta3/logging-gen.go b/logging/v1beta3/logging-gen.go
index 3049ad3..f384318 100644
--- a/logging/v1beta3/logging-gen.go
+++ b/logging/v1beta3/logging-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "logging:v1beta3"
const apiName = "logging"
@@ -719,6 +719,7 @@
s *Service
projectsId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the log services that have log entries in this project.
@@ -765,6 +766,14 @@
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 *ProjectsLogServicesListCall) Context(ctx context.Context) *ProjectsLogServicesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsLogServicesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -788,6 +797,9 @@
"projectsId": c.projectsId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -857,6 +869,7 @@
projectsId string
logServicesId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the current index values for a log service.
@@ -933,6 +946,14 @@
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 *ProjectsLogServicesIndexesListCall) Context(ctx context.Context) *ProjectsLogServicesIndexesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsLogServicesIndexesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -963,6 +984,9 @@
"logServicesId": c.logServicesId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1051,6 +1075,7 @@
logServicesId string
logsink *LogSink
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a log service sink. All log entries from a specified
@@ -1071,6 +1096,14 @@
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 *ProjectsLogServicesSinksCreateCall) Context(ctx context.Context) *ProjectsLogServicesSinksCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsLogServicesSinksCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
@@ -1092,6 +1125,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1154,6 +1190,7 @@
logServicesId string
sinksId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a log service sink. After deletion, no new log
@@ -1174,6 +1211,14 @@
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 *ProjectsLogServicesSinksDeleteCall) Context(ctx context.Context) *ProjectsLogServicesSinksDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsLogServicesSinksDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1190,6 +1235,9 @@
"sinksId": c.sinksId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1256,6 +1304,7 @@
logServicesId string
sinksId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a log service sink.
@@ -1275,6 +1324,14 @@
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 *ProjectsLogServicesSinksGetCall) Context(ctx context.Context) *ProjectsLogServicesSinksGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsLogServicesSinksGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1291,6 +1348,9 @@
"sinksId": c.sinksId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1358,6 +1418,7 @@
projectsId string
logServicesId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists log service sinks associated with a log service.
@@ -1376,6 +1437,14 @@
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 *ProjectsLogServicesSinksListCall) Context(ctx context.Context) *ProjectsLogServicesSinksListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsLogServicesSinksListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1391,6 +1460,9 @@
"logServicesId": c.logServicesId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1453,6 +1525,7 @@
sinksId string
logsink *LogSink
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a log service sink. If the sink does not exist, it is
@@ -1474,6 +1547,14 @@
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 *ProjectsLogServicesSinksUpdateCall) Context(ctx context.Context) *ProjectsLogServicesSinksUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsLogServicesSinksUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
@@ -1496,6 +1577,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1564,6 +1648,7 @@
projectsId string
logsId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a log and all its log entries. The log will reappear
@@ -1583,6 +1668,14 @@
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 *ProjectsLogsDeleteCall) Context(ctx context.Context) *ProjectsLogsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsLogsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1598,6 +1691,9 @@
"logsId": c.logsId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1655,6 +1751,7 @@
s *Service
projectsId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the logs in the project. Only logs that have entries are
@@ -1712,6 +1809,14 @@
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 *ProjectsLogsListCall) Context(ctx context.Context) *ProjectsLogsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsLogsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1738,6 +1843,9 @@
"projectsId": c.projectsId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1813,6 +1921,7 @@
logsId string
writelogentriesrequest *WriteLogEntriesRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Write: Writes log entries to Cloud Logging. Each entry consists of a
@@ -1837,6 +1946,14 @@
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 *ProjectsLogsEntriesWriteCall) Context(ctx context.Context) *ProjectsLogsEntriesWriteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsLogsEntriesWriteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.writelogentriesrequest)
@@ -1858,6 +1975,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1921,6 +2041,7 @@
logsId string
logsink *LogSink
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a log sink. All log entries for a specified log are
@@ -1941,6 +2062,14 @@
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 *ProjectsLogsSinksCreateCall) Context(ctx context.Context) *ProjectsLogsSinksCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsLogsSinksCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
@@ -1962,6 +2091,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2024,6 +2156,7 @@
logsId string
sinksId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a log sink. After deletion, no new log entries are
@@ -2044,6 +2177,14 @@
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 *ProjectsLogsSinksDeleteCall) Context(ctx context.Context) *ProjectsLogsSinksDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsLogsSinksDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2060,6 +2201,9 @@
"sinksId": c.sinksId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2126,6 +2270,7 @@
logsId string
sinksId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a log sink.
@@ -2145,6 +2290,14 @@
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 *ProjectsLogsSinksGetCall) Context(ctx context.Context) *ProjectsLogsSinksGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsLogsSinksGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2161,6 +2314,9 @@
"sinksId": c.sinksId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2228,6 +2384,7 @@
projectsId string
logsId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists log sinks associated with a log.
@@ -2246,6 +2403,14 @@
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 *ProjectsLogsSinksListCall) Context(ctx context.Context) *ProjectsLogsSinksListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsLogsSinksListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2261,6 +2426,9 @@
"logsId": c.logsId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2323,6 +2491,7 @@
sinksId string
logsink *LogSink
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a log sink. If the sink does not exist, it is
@@ -2344,6 +2513,14 @@
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 *ProjectsLogsSinksUpdateCall) Context(ctx context.Context) *ProjectsLogsSinksUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsLogsSinksUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
@@ -2366,6 +2543,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2434,6 +2614,7 @@
projectsId string
logsink *LogSink
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a project sink. A logs filter determines which log
@@ -2453,6 +2634,14 @@
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 *ProjectsSinksCreateCall) Context(ctx context.Context) *ProjectsSinksCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSinksCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
@@ -2473,6 +2662,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2527,6 +2719,7 @@
projectsId string
sinksId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a project sink. After deletion, no new log entries
@@ -2546,6 +2739,14 @@
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 *ProjectsSinksDeleteCall) Context(ctx context.Context) *ProjectsSinksDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSinksDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2561,6 +2762,9 @@
"sinksId": c.sinksId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2619,6 +2823,7 @@
projectsId string
sinksId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a project sink.
@@ -2637,6 +2842,14 @@
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 *ProjectsSinksGetCall) Context(ctx context.Context) *ProjectsSinksGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSinksGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2652,6 +2865,9 @@
"sinksId": c.sinksId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2711,6 +2927,7 @@
s *Service
projectsId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists project sinks associated with a project.
@@ -2728,6 +2945,14 @@
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 *ProjectsSinksListCall) Context(ctx context.Context) *ProjectsSinksListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSinksListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2742,6 +2967,9 @@
"projectsId": c.projectsId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2796,6 +3024,7 @@
sinksId string
logsink *LogSink
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a project sink. If the sink does not exist, it is
@@ -2816,6 +3045,14 @@
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 *ProjectsSinksUpdateCall) Context(ctx context.Context) *ProjectsSinksUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSinksUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink)
@@ -2837,6 +3074,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/manager/v1beta2/manager-gen.go b/manager/v1beta2/manager-gen.go
index 716148b..ae39d3a 100644
--- a/manager/v1beta2/manager-gen.go
+++ b/manager/v1beta2/manager-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "manager:v1beta2"
const apiName = "manager"
@@ -649,6 +649,7 @@
region string
deploymentName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete:
@@ -668,6 +669,14 @@
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 *DeploymentsDeleteCall) Context(ctx context.Context) *DeploymentsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DeploymentsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -684,6 +693,9 @@
"deploymentName": c.deploymentName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -740,6 +752,7 @@
region string
deploymentName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get:
@@ -759,6 +772,14 @@
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 *DeploymentsGetCall) Context(ctx context.Context) *DeploymentsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DeploymentsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -775,6 +796,9 @@
"deploymentName": c.deploymentName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -840,6 +864,7 @@
region string
deployment *Deployment
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert:
@@ -859,6 +884,14 @@
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 *DeploymentsInsertCall) Context(ctx context.Context) *DeploymentsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DeploymentsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.deployment)
@@ -880,6 +913,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -942,6 +978,7 @@
projectId string
region string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List:
@@ -977,6 +1014,14 @@
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 *DeploymentsListCall) Context(ctx context.Context) *DeploymentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DeploymentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -998,6 +1043,9 @@
"region": c.region,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1070,6 +1118,7 @@
projectId string
templateName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete:
@@ -1088,6 +1137,14 @@
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 *TemplatesDeleteCall) Context(ctx context.Context) *TemplatesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TemplatesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1103,6 +1160,9 @@
"templateName": c.templateName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1152,6 +1212,7 @@
projectId string
templateName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get:
@@ -1170,6 +1231,14 @@
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 *TemplatesGetCall) Context(ctx context.Context) *TemplatesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TemplatesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1185,6 +1254,9 @@
"templateName": c.templateName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1243,6 +1315,7 @@
projectId string
template *Template
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert:
@@ -1261,6 +1334,14 @@
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 *TemplatesInsertCall) Context(ctx context.Context) *TemplatesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TemplatesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.template)
@@ -1281,6 +1362,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1333,6 +1417,7 @@
s *Service
projectId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List:
@@ -1367,6 +1452,14 @@
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 *TemplatesListCall) Context(ctx context.Context) *TemplatesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TemplatesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1387,6 +1480,9 @@
"projectId": c.projectId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/mapsengine/exp2/mapsengine-gen.go b/mapsengine/exp2/mapsengine-gen.go
index 18c90df..9567d41 100644
--- a/mapsengine/exp2/mapsengine-gen.go
+++ b/mapsengine/exp2/mapsengine-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "mapsengine:exp2"
const apiName = "mapsengine"
@@ -1937,6 +1937,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Return metadata for a particular asset.
@@ -1954,6 +1955,14 @@
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 *AssetsGetCall) Context(ctx context.Context) *AssetsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AssetsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1968,6 +1977,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2017,6 +2029,7 @@
type AssetsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all assets readable by the current user.
@@ -2144,6 +2157,14 @@
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 *AssetsListCall) Context(ctx context.Context) *AssetsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AssetsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2195,6 +2216,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2316,6 +2340,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all parent ids of the specified asset.
@@ -2350,6 +2375,14 @@
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 *AssetsParentsListCall) Context(ctx context.Context) *AssetsParentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AssetsParentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2370,6 +2403,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2431,6 +2467,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all of the permissions for the specified asset.
@@ -2448,6 +2485,14 @@
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 *AssetsPermissionsListCall) Context(ctx context.Context) *AssetsPermissionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AssetsPermissionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2462,6 +2507,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2512,6 +2560,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// CancelProcessing: Cancel processing on a layer asset.
@@ -2529,6 +2578,14 @@
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 *LayersCancelProcessingCall) Context(ctx context.Context) *LayersCancelProcessingCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersCancelProcessingCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2543,6 +2600,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2592,6 +2652,7 @@
s *Service
layer *Layer
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Create a layer asset.
@@ -2616,6 +2677,14 @@
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 *LayersCreateCall) Context(ctx context.Context) *LayersCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.layer)
@@ -2637,6 +2706,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2685,6 +2757,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a layer.
@@ -2702,6 +2775,14 @@
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 *LayersDeleteCall) Context(ctx context.Context) *LayersDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2716,6 +2797,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2758,6 +2842,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Return metadata for a particular layer.
@@ -2789,6 +2874,14 @@
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 *LayersGetCall) Context(ctx context.Context) *LayersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2806,6 +2899,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2869,6 +2965,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetPublished: Return the published metadata for a particular layer.
@@ -2886,6 +2983,14 @@
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 *LayersGetPublishedCall) Context(ctx context.Context) *LayersGetPublishedCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersGetPublishedCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2900,6 +3005,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2949,6 +3057,7 @@
type LayersListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all layers readable by the current user.
@@ -3080,6 +3189,14 @@
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 *LayersListCall) Context(ctx context.Context) *LayersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3131,6 +3248,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3264,6 +3384,7 @@
type LayersListPublishedCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ListPublished: Return all published layers readable by the current
@@ -3315,6 +3436,14 @@
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 *LayersListPublishedCall) Context(ctx context.Context) *LayersListPublishedCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersListPublishedCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3339,6 +3468,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3402,6 +3534,7 @@
id string
layer *Layer
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Mutate a layer asset.
@@ -3420,6 +3553,14 @@
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 *LayersPatchCall) Context(ctx context.Context) *LayersPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.layer)
@@ -3440,6 +3581,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3485,6 +3629,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Process: Process a layer asset.
@@ -3502,6 +3647,14 @@
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 *LayersProcessCall) Context(ctx context.Context) *LayersProcessCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersProcessCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3516,6 +3669,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3565,6 +3721,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Publish: Publish a layer asset.
@@ -3591,6 +3748,14 @@
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 *LayersPublishCall) Context(ctx context.Context) *LayersPublishCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersPublishCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3608,6 +3773,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3662,6 +3830,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Unpublish: Unpublish a layer asset.
@@ -3679,6 +3848,14 @@
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 *LayersUnpublishCall) Context(ctx context.Context) *LayersUnpublishCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersUnpublishCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3693,6 +3870,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3742,6 +3922,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all parent ids of the specified layer.
@@ -3776,6 +3957,14 @@
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 *LayersParentsListCall) Context(ctx context.Context) *LayersParentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersParentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3796,6 +3985,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3858,6 +4050,7 @@
id string
permissionsbatchdeleterequest *PermissionsBatchDeleteRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchDelete: Remove permission entries from an already existing
@@ -3877,6 +4070,14 @@
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 *LayersPermissionsBatchDeleteCall) Context(ctx context.Context) *LayersPermissionsBatchDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersPermissionsBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.permissionsbatchdeleterequest)
@@ -3897,6 +4098,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3950,6 +4154,7 @@
id string
permissionsbatchupdaterequest *PermissionsBatchUpdateRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchUpdate: Add or update permission entries to an already existing
@@ -3972,6 +4177,14 @@
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 *LayersPermissionsBatchUpdateCall) Context(ctx context.Context) *LayersPermissionsBatchUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersPermissionsBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.permissionsbatchupdaterequest)
@@ -3992,6 +4205,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4044,6 +4260,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all of the permissions for the specified asset.
@@ -4061,6 +4278,14 @@
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 *LayersPermissionsListCall) Context(ctx context.Context) *LayersPermissionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersPermissionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4075,6 +4300,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4125,6 +4353,7 @@
s *Service
map_ *Map
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Create a map asset.
@@ -4142,6 +4371,14 @@
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 *MapsCreateCall) Context(ctx context.Context) *MapsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MapsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.map_)
@@ -4160,6 +4397,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4201,6 +4441,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a map.
@@ -4218,6 +4459,14 @@
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 *MapsDeleteCall) Context(ctx context.Context) *MapsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MapsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4232,6 +4481,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4274,6 +4526,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Return metadata for a particular map.
@@ -4305,6 +4558,14 @@
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 *MapsGetCall) Context(ctx context.Context) *MapsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MapsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4322,6 +4583,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4385,6 +4649,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetPublished: Return the published metadata for a particular map.
@@ -4402,6 +4667,14 @@
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 *MapsGetPublishedCall) Context(ctx context.Context) *MapsGetPublishedCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MapsGetPublishedCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4416,6 +4689,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4465,6 +4741,7 @@
type MapsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all maps readable by the current user.
@@ -4609,6 +4886,14 @@
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 *MapsListCall) Context(ctx context.Context) *MapsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MapsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4663,6 +4948,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4807,6 +5095,7 @@
type MapsListPublishedCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ListPublished: Return all published maps readable by the current
@@ -4858,6 +5147,14 @@
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 *MapsListPublishedCall) Context(ctx context.Context) *MapsListPublishedCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MapsListPublishedCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4882,6 +5179,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4945,6 +5245,7 @@
id string
map_ *Map
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Mutate a map asset.
@@ -4963,6 +5264,14 @@
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 *MapsPatchCall) Context(ctx context.Context) *MapsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MapsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.map_)
@@ -4983,6 +5292,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5028,6 +5340,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Publish: Publish a map asset.
@@ -5053,6 +5366,14 @@
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 *MapsPublishCall) Context(ctx context.Context) *MapsPublishCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MapsPublishCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5070,6 +5391,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5124,6 +5448,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Unpublish: Unpublish a map asset.
@@ -5141,6 +5466,14 @@
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 *MapsUnpublishCall) Context(ctx context.Context) *MapsUnpublishCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MapsUnpublishCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5155,6 +5488,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5205,6 +5541,7 @@
id string
permissionsbatchdeleterequest *PermissionsBatchDeleteRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchDelete: Remove permission entries from an already existing
@@ -5224,6 +5561,14 @@
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 *MapsPermissionsBatchDeleteCall) Context(ctx context.Context) *MapsPermissionsBatchDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MapsPermissionsBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.permissionsbatchdeleterequest)
@@ -5244,6 +5589,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5297,6 +5645,7 @@
id string
permissionsbatchupdaterequest *PermissionsBatchUpdateRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchUpdate: Add or update permission entries to an already existing
@@ -5319,6 +5668,14 @@
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 *MapsPermissionsBatchUpdateCall) Context(ctx context.Context) *MapsPermissionsBatchUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MapsPermissionsBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.permissionsbatchupdaterequest)
@@ -5339,6 +5696,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5391,6 +5751,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all of the permissions for the specified asset.
@@ -5408,6 +5769,14 @@
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 *MapsPermissionsListCall) Context(ctx context.Context) *MapsPermissionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MapsPermissionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5422,6 +5791,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5471,6 +5843,7 @@
type ProjectsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all projects readable by the current user.
@@ -5487,6 +5860,14 @@
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 *ProjectsListCall) Context(ctx context.Context) *ProjectsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5499,6 +5880,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5542,8 +5926,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Create: Create an icon.
@@ -5562,10 +5946,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *ProjectsIconsCreateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ProjectsIconsCreateCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -5590,6 +5976,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *ProjectsIconsCreateCall) Context(ctx context.Context) *ProjectsIconsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsIconsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.icon)
@@ -5629,6 +6025,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5722,6 +6121,7 @@
projectId string
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Return an icon or its associated metadata
@@ -5740,6 +6140,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *ProjectsIconsGetCall) Context(ctx context.Context) *ProjectsIconsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsIconsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5755,6 +6163,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5828,6 +6239,7 @@
s *Service
projectId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all icons in the current project
@@ -5862,6 +6274,14 @@
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 *ProjectsIconsListCall) Context(ctx context.Context) *ProjectsIconsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsIconsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5882,6 +6302,9 @@
"projectId": c.projectId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5943,6 +6366,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// CancelProcessing: Cancel processing on a raster collection asset.
@@ -5960,6 +6384,14 @@
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 *RasterCollectionsCancelProcessingCall) Context(ctx context.Context) *RasterCollectionsCancelProcessingCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RasterCollectionsCancelProcessingCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5974,6 +6406,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6023,6 +6458,7 @@
s *Service
rastercollection *RasterCollection
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Create a raster collection asset.
@@ -6040,6 +6476,14 @@
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 *RasterCollectionsCreateCall) Context(ctx context.Context) *RasterCollectionsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RasterCollectionsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.rastercollection)
@@ -6058,6 +6502,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6099,6 +6546,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a raster collection.
@@ -6116,6 +6564,14 @@
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 *RasterCollectionsDeleteCall) Context(ctx context.Context) *RasterCollectionsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RasterCollectionsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6130,6 +6586,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6172,6 +6631,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Return metadata for a particular raster collection.
@@ -6189,6 +6649,14 @@
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 *RasterCollectionsGetCall) Context(ctx context.Context) *RasterCollectionsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RasterCollectionsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6203,6 +6671,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6252,6 +6723,7 @@
type RasterCollectionsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all raster collections readable by the current user.
@@ -6383,6 +6855,14 @@
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 *RasterCollectionsListCall) Context(ctx context.Context) *RasterCollectionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RasterCollectionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6434,6 +6914,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6569,6 +7052,7 @@
id string
rastercollection *RasterCollection
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Mutate a raster collection asset.
@@ -6587,6 +7071,14 @@
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 *RasterCollectionsPatchCall) Context(ctx context.Context) *RasterCollectionsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RasterCollectionsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.rastercollection)
@@ -6607,6 +7099,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6652,6 +7147,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Process: Process a raster collection asset.
@@ -6669,6 +7165,14 @@
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 *RasterCollectionsProcessCall) Context(ctx context.Context) *RasterCollectionsProcessCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RasterCollectionsProcessCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6683,6 +7187,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6732,6 +7239,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all parent ids of the specified raster collection.
@@ -6766,6 +7274,14 @@
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 *RasterCollectionsParentsListCall) Context(ctx context.Context) *RasterCollectionsParentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RasterCollectionsParentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6786,6 +7302,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6848,6 +7367,7 @@
id string
permissionsbatchdeleterequest *PermissionsBatchDeleteRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchDelete: Remove permission entries from an already existing
@@ -6867,6 +7387,14 @@
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 *RasterCollectionsPermissionsBatchDeleteCall) Context(ctx context.Context) *RasterCollectionsPermissionsBatchDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RasterCollectionsPermissionsBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.permissionsbatchdeleterequest)
@@ -6887,6 +7415,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6940,6 +7471,7 @@
id string
permissionsbatchupdaterequest *PermissionsBatchUpdateRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchUpdate: Add or update permission entries to an already existing
@@ -6962,6 +7494,14 @@
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 *RasterCollectionsPermissionsBatchUpdateCall) Context(ctx context.Context) *RasterCollectionsPermissionsBatchUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RasterCollectionsPermissionsBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.permissionsbatchupdaterequest)
@@ -6982,6 +7522,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7034,6 +7577,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all of the permissions for the specified asset.
@@ -7051,6 +7595,14 @@
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 *RasterCollectionsPermissionsListCall) Context(ctx context.Context) *RasterCollectionsPermissionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RasterCollectionsPermissionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7065,6 +7617,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7116,6 +7671,7 @@
id string
rastercollectionsrasterbatchdeleterequest *RasterCollectionsRasterBatchDeleteRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchDelete: Remove rasters from an existing raster collection.
@@ -7137,6 +7693,14 @@
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 *RasterCollectionsRastersBatchDeleteCall) Context(ctx context.Context) *RasterCollectionsRastersBatchDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RasterCollectionsRastersBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.rastercollectionsrasterbatchdeleterequest)
@@ -7157,6 +7721,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7210,6 +7777,7 @@
id string
rastercollectionsrastersbatchinsertrequest *RasterCollectionsRastersBatchInsertRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchInsert: Add rasters to an existing raster collection. Rasters
@@ -7233,6 +7801,14 @@
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 *RasterCollectionsRastersBatchInsertCall) Context(ctx context.Context) *RasterCollectionsRastersBatchInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RasterCollectionsRastersBatchInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.rastercollectionsrastersbatchinsertrequest)
@@ -7253,6 +7829,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7305,6 +7884,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all rasters within a raster collection.
@@ -7414,6 +7994,14 @@
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 *RasterCollectionsRastersListCall) Context(ctx context.Context) *RasterCollectionsRastersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RasterCollectionsRastersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7461,6 +8049,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7581,6 +8172,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a raster.
@@ -7598,6 +8190,14 @@
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 *RastersDeleteCall) Context(ctx context.Context) *RastersDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RastersDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7612,6 +8212,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7654,6 +8257,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Return metadata for a single raster.
@@ -7671,6 +8275,14 @@
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 *RastersGetCall) Context(ctx context.Context) *RastersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RastersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7685,6 +8297,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7735,6 +8350,7 @@
s *Service
projectId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all rasters readable by the current user.
@@ -7857,6 +8473,14 @@
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 *RastersListCall) Context(ctx context.Context) *RastersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RastersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7906,6 +8530,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8045,6 +8672,7 @@
id string
raster *Raster
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Mutate a raster asset.
@@ -8063,6 +8691,14 @@
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 *RastersPatchCall) Context(ctx context.Context) *RastersPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RastersPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.raster)
@@ -8083,6 +8719,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8128,6 +8767,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Process: Process a raster asset.
@@ -8145,6 +8785,14 @@
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 *RastersProcessCall) Context(ctx context.Context) *RastersProcessCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RastersProcessCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8159,6 +8807,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8208,6 +8859,7 @@
s *Service
raster *Raster
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Upload: Create a skeleton raster asset for upload.
@@ -8225,6 +8877,14 @@
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 *RastersUploadCall) Context(ctx context.Context) *RastersUploadCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RastersUploadCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.raster)
@@ -8243,6 +8903,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8288,8 +8951,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Insert: Upload a file to a raster asset.
@@ -8308,10 +8971,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *RastersFilesInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *RastersFilesInsertCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -8336,6 +9001,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *RastersFilesInsertCall) Context(ctx context.Context) *RastersFilesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RastersFilesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8373,6 +9048,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8462,6 +9140,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all parent ids of the specified rasters.
@@ -8496,6 +9175,14 @@
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 *RastersParentsListCall) Context(ctx context.Context) *RastersParentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RastersParentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8516,6 +9203,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8578,6 +9268,7 @@
id string
permissionsbatchdeleterequest *PermissionsBatchDeleteRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchDelete: Remove permission entries from an already existing
@@ -8597,6 +9288,14 @@
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 *RastersPermissionsBatchDeleteCall) Context(ctx context.Context) *RastersPermissionsBatchDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RastersPermissionsBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.permissionsbatchdeleterequest)
@@ -8617,6 +9316,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8670,6 +9372,7 @@
id string
permissionsbatchupdaterequest *PermissionsBatchUpdateRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchUpdate: Add or update permission entries to an already existing
@@ -8692,6 +9395,14 @@
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 *RastersPermissionsBatchUpdateCall) Context(ctx context.Context) *RastersPermissionsBatchUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RastersPermissionsBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.permissionsbatchupdaterequest)
@@ -8712,6 +9423,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8764,6 +9478,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all of the permissions for the specified asset.
@@ -8781,6 +9496,14 @@
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 *RastersPermissionsListCall) Context(ctx context.Context) *RastersPermissionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RastersPermissionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8795,6 +9518,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8845,6 +9571,7 @@
s *Service
table *Table
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Create a table asset.
@@ -8862,6 +9589,14 @@
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 *TablesCreateCall) Context(ctx context.Context) *TablesCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.table)
@@ -8880,6 +9615,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8921,6 +9659,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a table.
@@ -8938,6 +9677,14 @@
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 *TablesDeleteCall) Context(ctx context.Context) *TablesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8952,6 +9699,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8994,6 +9744,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Return metadata for a particular table, including the schema.
@@ -9021,6 +9772,14 @@
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 *TablesGetCall) Context(ctx context.Context) *TablesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9038,6 +9797,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9099,6 +9861,7 @@
type TablesListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all tables readable by the current user.
@@ -9230,6 +9993,14 @@
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 *TablesListCall) Context(ctx context.Context) *TablesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9281,6 +10052,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9416,6 +10190,7 @@
id string
table *Table
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Mutate a table asset.
@@ -9434,6 +10209,14 @@
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 *TablesPatchCall) Context(ctx context.Context) *TablesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.table)
@@ -9454,6 +10237,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9499,6 +10285,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Process: Process a table asset.
@@ -9516,6 +10303,14 @@
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 *TablesProcessCall) Context(ctx context.Context) *TablesProcessCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesProcessCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9530,6 +10325,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9579,6 +10377,7 @@
s *Service
table *Table
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Upload: Create a placeholder table asset to which table files can be
@@ -9602,6 +10401,14 @@
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 *TablesUploadCall) Context(ctx context.Context) *TablesUploadCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesUploadCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.table)
@@ -9620,6 +10427,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9662,6 +10472,7 @@
id string
featuresbatchdeleterequest *FeaturesBatchDeleteRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchDelete: Delete all features matching the given IDs.
@@ -9680,6 +10491,14 @@
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 *TablesFeaturesBatchDeleteCall) Context(ctx context.Context) *TablesFeaturesBatchDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesFeaturesBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.featuresbatchdeleterequest)
@@ -9700,6 +10519,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9746,6 +10568,7 @@
id string
featuresbatchinsertrequest *FeaturesBatchInsertRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchInsert: Append features to an existing table.
@@ -9775,6 +10598,14 @@
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 *TablesFeaturesBatchInsertCall) Context(ctx context.Context) *TablesFeaturesBatchInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesFeaturesBatchInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.featuresbatchinsertrequest)
@@ -9795,6 +10626,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9841,6 +10675,7 @@
id string
featuresbatchpatchrequest *FeaturesBatchPatchRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchPatch: Update the supplied features.
@@ -9880,6 +10715,14 @@
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 *TablesFeaturesBatchPatchCall) Context(ctx context.Context) *TablesFeaturesBatchPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesFeaturesBatchPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.featuresbatchpatchrequest)
@@ -9900,6 +10743,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9946,6 +10792,7 @@
tableId string
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Return a single feature, given its ID.
@@ -9983,6 +10830,14 @@
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 *TablesFeaturesGetCall) Context(ctx context.Context) *TablesFeaturesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesFeaturesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10004,6 +10859,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10079,6 +10937,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all features readable by the current user.
@@ -10169,6 +11028,14 @@
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 *TablesFeaturesListCall) Context(ctx context.Context) *TablesFeaturesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesFeaturesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10210,6 +11077,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10319,8 +11189,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Insert: Upload a file to a placeholder table asset. See Table Upload
@@ -10342,10 +11212,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *TablesFilesInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *TablesFilesInsertCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -10370,6 +11242,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *TablesFilesInsertCall) Context(ctx context.Context) *TablesFilesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesFilesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10407,6 +11289,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10496,6 +11381,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all parent ids of the specified table.
@@ -10530,6 +11416,14 @@
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 *TablesParentsListCall) Context(ctx context.Context) *TablesParentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesParentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10550,6 +11444,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10612,6 +11509,7 @@
id string
permissionsbatchdeleterequest *PermissionsBatchDeleteRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchDelete: Remove permission entries from an already existing
@@ -10631,6 +11529,14 @@
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 *TablesPermissionsBatchDeleteCall) Context(ctx context.Context) *TablesPermissionsBatchDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesPermissionsBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.permissionsbatchdeleterequest)
@@ -10651,6 +11557,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10704,6 +11613,7 @@
id string
permissionsbatchupdaterequest *PermissionsBatchUpdateRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchUpdate: Add or update permission entries to an already existing
@@ -10726,6 +11636,14 @@
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 *TablesPermissionsBatchUpdateCall) Context(ctx context.Context) *TablesPermissionsBatchUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesPermissionsBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.permissionsbatchupdaterequest)
@@ -10746,6 +11664,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10798,6 +11719,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all of the permissions for the specified asset.
@@ -10815,6 +11737,14 @@
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 *TablesPermissionsListCall) Context(ctx context.Context) *TablesPermissionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesPermissionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10829,6 +11759,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/mapsengine/v1/mapsengine-gen.go b/mapsengine/v1/mapsengine-gen.go
index fbb653a..58cc02e 100644
--- a/mapsengine/v1/mapsengine-gen.go
+++ b/mapsengine/v1/mapsengine-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "mapsengine:v1"
const apiName = "mapsengine"
@@ -1934,6 +1934,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Return metadata for a particular asset.
@@ -1951,6 +1952,14 @@
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 *AssetsGetCall) Context(ctx context.Context) *AssetsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AssetsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1965,6 +1974,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2014,6 +2026,7 @@
type AssetsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all assets readable by the current user.
@@ -2141,6 +2154,14 @@
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 *AssetsListCall) Context(ctx context.Context) *AssetsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AssetsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2192,6 +2213,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2313,6 +2337,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all parent ids of the specified asset.
@@ -2347,6 +2372,14 @@
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 *AssetsParentsListCall) Context(ctx context.Context) *AssetsParentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AssetsParentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2367,6 +2400,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2428,6 +2464,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all of the permissions for the specified asset.
@@ -2445,6 +2482,14 @@
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 *AssetsPermissionsListCall) Context(ctx context.Context) *AssetsPermissionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AssetsPermissionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2459,6 +2504,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2509,6 +2557,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// CancelProcessing: Cancel processing on a layer asset.
@@ -2526,6 +2575,14 @@
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 *LayersCancelProcessingCall) Context(ctx context.Context) *LayersCancelProcessingCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersCancelProcessingCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2540,6 +2597,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2589,6 +2649,7 @@
s *Service
layer *Layer
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Create a layer asset.
@@ -2613,6 +2674,14 @@
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 *LayersCreateCall) Context(ctx context.Context) *LayersCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.layer)
@@ -2634,6 +2703,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2682,6 +2754,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a layer.
@@ -2699,6 +2772,14 @@
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 *LayersDeleteCall) Context(ctx context.Context) *LayersDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2713,6 +2794,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2755,6 +2839,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Return metadata for a particular layer.
@@ -2786,6 +2871,14 @@
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 *LayersGetCall) Context(ctx context.Context) *LayersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2803,6 +2896,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2866,6 +2962,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetPublished: Return the published metadata for a particular layer.
@@ -2883,6 +2980,14 @@
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 *LayersGetPublishedCall) Context(ctx context.Context) *LayersGetPublishedCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersGetPublishedCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2897,6 +3002,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2946,6 +3054,7 @@
type LayersListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all layers readable by the current user.
@@ -3077,6 +3186,14 @@
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 *LayersListCall) Context(ctx context.Context) *LayersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3128,6 +3245,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3261,6 +3381,7 @@
type LayersListPublishedCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ListPublished: Return all published layers readable by the current
@@ -3305,6 +3426,14 @@
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 *LayersListPublishedCall) Context(ctx context.Context) *LayersListPublishedCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersListPublishedCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3326,6 +3455,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3384,6 +3516,7 @@
id string
layer *Layer
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Mutate a layer asset.
@@ -3402,6 +3535,14 @@
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 *LayersPatchCall) Context(ctx context.Context) *LayersPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.layer)
@@ -3422,6 +3563,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3467,6 +3611,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Process: Process a layer asset.
@@ -3484,6 +3629,14 @@
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 *LayersProcessCall) Context(ctx context.Context) *LayersProcessCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersProcessCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3498,6 +3651,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3547,6 +3703,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Publish: Publish a layer asset.
@@ -3573,6 +3730,14 @@
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 *LayersPublishCall) Context(ctx context.Context) *LayersPublishCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersPublishCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3590,6 +3755,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3644,6 +3812,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Unpublish: Unpublish a layer asset.
@@ -3661,6 +3830,14 @@
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 *LayersUnpublishCall) Context(ctx context.Context) *LayersUnpublishCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersUnpublishCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3675,6 +3852,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3724,6 +3904,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all parent ids of the specified layer.
@@ -3758,6 +3939,14 @@
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 *LayersParentsListCall) Context(ctx context.Context) *LayersParentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersParentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3778,6 +3967,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3840,6 +4032,7 @@
id string
permissionsbatchdeleterequest *PermissionsBatchDeleteRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchDelete: Remove permission entries from an already existing
@@ -3859,6 +4052,14 @@
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 *LayersPermissionsBatchDeleteCall) Context(ctx context.Context) *LayersPermissionsBatchDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersPermissionsBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.permissionsbatchdeleterequest)
@@ -3879,6 +4080,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3932,6 +4136,7 @@
id string
permissionsbatchupdaterequest *PermissionsBatchUpdateRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchUpdate: Add or update permission entries to an already existing
@@ -3954,6 +4159,14 @@
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 *LayersPermissionsBatchUpdateCall) Context(ctx context.Context) *LayersPermissionsBatchUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersPermissionsBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.permissionsbatchupdaterequest)
@@ -3974,6 +4187,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4026,6 +4242,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all of the permissions for the specified asset.
@@ -4043,6 +4260,14 @@
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 *LayersPermissionsListCall) Context(ctx context.Context) *LayersPermissionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LayersPermissionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4057,6 +4282,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4107,6 +4335,7 @@
s *Service
map_ *Map
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Create a map asset.
@@ -4124,6 +4353,14 @@
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 *MapsCreateCall) Context(ctx context.Context) *MapsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MapsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.map_)
@@ -4142,6 +4379,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4183,6 +4423,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a map.
@@ -4200,6 +4441,14 @@
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 *MapsDeleteCall) Context(ctx context.Context) *MapsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MapsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4214,6 +4463,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4256,6 +4508,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Return metadata for a particular map.
@@ -4287,6 +4540,14 @@
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 *MapsGetCall) Context(ctx context.Context) *MapsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MapsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4304,6 +4565,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4367,6 +4631,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetPublished: Return the published metadata for a particular map.
@@ -4384,6 +4649,14 @@
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 *MapsGetPublishedCall) Context(ctx context.Context) *MapsGetPublishedCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MapsGetPublishedCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4398,6 +4671,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4447,6 +4723,7 @@
type MapsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all maps readable by the current user.
@@ -4577,6 +4854,14 @@
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 *MapsListCall) Context(ctx context.Context) *MapsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MapsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4628,6 +4913,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4759,6 +5047,7 @@
type MapsListPublishedCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ListPublished: Return all published maps readable by the current
@@ -4803,6 +5092,14 @@
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 *MapsListPublishedCall) Context(ctx context.Context) *MapsListPublishedCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MapsListPublishedCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4824,6 +5121,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4882,6 +5182,7 @@
id string
map_ *Map
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Mutate a map asset.
@@ -4900,6 +5201,14 @@
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 *MapsPatchCall) Context(ctx context.Context) *MapsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MapsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.map_)
@@ -4920,6 +5229,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4965,6 +5277,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Publish: Publish a map asset.
@@ -4990,6 +5303,14 @@
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 *MapsPublishCall) Context(ctx context.Context) *MapsPublishCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MapsPublishCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5007,6 +5328,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5061,6 +5385,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Unpublish: Unpublish a map asset.
@@ -5078,6 +5403,14 @@
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 *MapsUnpublishCall) Context(ctx context.Context) *MapsUnpublishCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MapsUnpublishCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5092,6 +5425,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5142,6 +5478,7 @@
id string
permissionsbatchdeleterequest *PermissionsBatchDeleteRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchDelete: Remove permission entries from an already existing
@@ -5161,6 +5498,14 @@
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 *MapsPermissionsBatchDeleteCall) Context(ctx context.Context) *MapsPermissionsBatchDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MapsPermissionsBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.permissionsbatchdeleterequest)
@@ -5181,6 +5526,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5234,6 +5582,7 @@
id string
permissionsbatchupdaterequest *PermissionsBatchUpdateRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchUpdate: Add or update permission entries to an already existing
@@ -5256,6 +5605,14 @@
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 *MapsPermissionsBatchUpdateCall) Context(ctx context.Context) *MapsPermissionsBatchUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MapsPermissionsBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.permissionsbatchupdaterequest)
@@ -5276,6 +5633,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5328,6 +5688,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all of the permissions for the specified asset.
@@ -5345,6 +5706,14 @@
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 *MapsPermissionsListCall) Context(ctx context.Context) *MapsPermissionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MapsPermissionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5359,6 +5728,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5408,6 +5780,7 @@
type ProjectsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all projects readable by the current user.
@@ -5424,6 +5797,14 @@
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 *ProjectsListCall) Context(ctx context.Context) *ProjectsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5436,6 +5817,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5479,8 +5863,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Create: Create an icon.
@@ -5499,10 +5883,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *ProjectsIconsCreateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ProjectsIconsCreateCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -5527,6 +5913,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *ProjectsIconsCreateCall) Context(ctx context.Context) *ProjectsIconsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsIconsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.icon)
@@ -5566,6 +5962,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5659,6 +6058,7 @@
projectId string
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Return an icon or its associated metadata
@@ -5677,6 +6077,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *ProjectsIconsGetCall) Context(ctx context.Context) *ProjectsIconsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsIconsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5692,6 +6100,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5765,6 +6176,7 @@
s *Service
projectId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all icons in the current project
@@ -5799,6 +6211,14 @@
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 *ProjectsIconsListCall) Context(ctx context.Context) *ProjectsIconsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsIconsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5819,6 +6239,9 @@
"projectId": c.projectId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5880,6 +6303,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// CancelProcessing: Cancel processing on a raster collection asset.
@@ -5897,6 +6321,14 @@
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 *RasterCollectionsCancelProcessingCall) Context(ctx context.Context) *RasterCollectionsCancelProcessingCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RasterCollectionsCancelProcessingCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5911,6 +6343,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5960,6 +6395,7 @@
s *Service
rastercollection *RasterCollection
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Create a raster collection asset.
@@ -5977,6 +6413,14 @@
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 *RasterCollectionsCreateCall) Context(ctx context.Context) *RasterCollectionsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RasterCollectionsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.rastercollection)
@@ -5995,6 +6439,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6036,6 +6483,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a raster collection.
@@ -6053,6 +6501,14 @@
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 *RasterCollectionsDeleteCall) Context(ctx context.Context) *RasterCollectionsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RasterCollectionsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6067,6 +6523,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6109,6 +6568,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Return metadata for a particular raster collection.
@@ -6126,6 +6586,14 @@
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 *RasterCollectionsGetCall) Context(ctx context.Context) *RasterCollectionsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RasterCollectionsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6140,6 +6608,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6189,6 +6660,7 @@
type RasterCollectionsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all raster collections readable by the current user.
@@ -6320,6 +6792,14 @@
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 *RasterCollectionsListCall) Context(ctx context.Context) *RasterCollectionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RasterCollectionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6371,6 +6851,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6506,6 +6989,7 @@
id string
rastercollection *RasterCollection
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Mutate a raster collection asset.
@@ -6524,6 +7008,14 @@
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 *RasterCollectionsPatchCall) Context(ctx context.Context) *RasterCollectionsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RasterCollectionsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.rastercollection)
@@ -6544,6 +7036,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6589,6 +7084,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Process: Process a raster collection asset.
@@ -6606,6 +7102,14 @@
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 *RasterCollectionsProcessCall) Context(ctx context.Context) *RasterCollectionsProcessCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RasterCollectionsProcessCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6620,6 +7124,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6669,6 +7176,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all parent ids of the specified raster collection.
@@ -6703,6 +7211,14 @@
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 *RasterCollectionsParentsListCall) Context(ctx context.Context) *RasterCollectionsParentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RasterCollectionsParentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6723,6 +7239,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6785,6 +7304,7 @@
id string
permissionsbatchdeleterequest *PermissionsBatchDeleteRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchDelete: Remove permission entries from an already existing
@@ -6804,6 +7324,14 @@
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 *RasterCollectionsPermissionsBatchDeleteCall) Context(ctx context.Context) *RasterCollectionsPermissionsBatchDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RasterCollectionsPermissionsBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.permissionsbatchdeleterequest)
@@ -6824,6 +7352,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6877,6 +7408,7 @@
id string
permissionsbatchupdaterequest *PermissionsBatchUpdateRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchUpdate: Add or update permission entries to an already existing
@@ -6899,6 +7431,14 @@
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 *RasterCollectionsPermissionsBatchUpdateCall) Context(ctx context.Context) *RasterCollectionsPermissionsBatchUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RasterCollectionsPermissionsBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.permissionsbatchupdaterequest)
@@ -6919,6 +7459,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6971,6 +7514,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all of the permissions for the specified asset.
@@ -6988,6 +7532,14 @@
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 *RasterCollectionsPermissionsListCall) Context(ctx context.Context) *RasterCollectionsPermissionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RasterCollectionsPermissionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7002,6 +7554,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7053,6 +7608,7 @@
id string
rastercollectionsrasterbatchdeleterequest *RasterCollectionsRasterBatchDeleteRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchDelete: Remove rasters from an existing raster collection.
@@ -7074,6 +7630,14 @@
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 *RasterCollectionsRastersBatchDeleteCall) Context(ctx context.Context) *RasterCollectionsRastersBatchDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RasterCollectionsRastersBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.rastercollectionsrasterbatchdeleterequest)
@@ -7094,6 +7658,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7147,6 +7714,7 @@
id string
rastercollectionsrastersbatchinsertrequest *RasterCollectionsRastersBatchInsertRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchInsert: Add rasters to an existing raster collection. Rasters
@@ -7170,6 +7738,14 @@
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 *RasterCollectionsRastersBatchInsertCall) Context(ctx context.Context) *RasterCollectionsRastersBatchInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RasterCollectionsRastersBatchInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.rastercollectionsrastersbatchinsertrequest)
@@ -7190,6 +7766,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7242,6 +7821,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all rasters within a raster collection.
@@ -7351,6 +7931,14 @@
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 *RasterCollectionsRastersListCall) Context(ctx context.Context) *RasterCollectionsRastersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RasterCollectionsRastersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7398,6 +7986,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7518,6 +8109,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a raster.
@@ -7535,6 +8127,14 @@
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 *RastersDeleteCall) Context(ctx context.Context) *RastersDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RastersDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7549,6 +8149,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7591,6 +8194,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Return metadata for a single raster.
@@ -7608,6 +8212,14 @@
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 *RastersGetCall) Context(ctx context.Context) *RastersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RastersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7622,6 +8234,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7672,6 +8287,7 @@
s *Service
projectId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all rasters readable by the current user.
@@ -7794,6 +8410,14 @@
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 *RastersListCall) Context(ctx context.Context) *RastersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RastersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7843,6 +8467,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7982,6 +8609,7 @@
id string
raster *Raster
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Mutate a raster asset.
@@ -8000,6 +8628,14 @@
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 *RastersPatchCall) Context(ctx context.Context) *RastersPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RastersPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.raster)
@@ -8020,6 +8656,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8065,6 +8704,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Process: Process a raster asset.
@@ -8082,6 +8722,14 @@
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 *RastersProcessCall) Context(ctx context.Context) *RastersProcessCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RastersProcessCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8096,6 +8744,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8145,6 +8796,7 @@
s *Service
raster *Raster
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Upload: Create a skeleton raster asset for upload.
@@ -8162,6 +8814,14 @@
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 *RastersUploadCall) Context(ctx context.Context) *RastersUploadCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RastersUploadCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.raster)
@@ -8180,6 +8840,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8225,8 +8888,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Insert: Upload a file to a raster asset.
@@ -8245,10 +8908,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *RastersFilesInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *RastersFilesInsertCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -8273,6 +8938,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *RastersFilesInsertCall) Context(ctx context.Context) *RastersFilesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RastersFilesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8310,6 +8985,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8399,6 +9077,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all parent ids of the specified rasters.
@@ -8433,6 +9112,14 @@
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 *RastersParentsListCall) Context(ctx context.Context) *RastersParentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RastersParentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8453,6 +9140,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8515,6 +9205,7 @@
id string
permissionsbatchdeleterequest *PermissionsBatchDeleteRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchDelete: Remove permission entries from an already existing
@@ -8534,6 +9225,14 @@
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 *RastersPermissionsBatchDeleteCall) Context(ctx context.Context) *RastersPermissionsBatchDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RastersPermissionsBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.permissionsbatchdeleterequest)
@@ -8554,6 +9253,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8607,6 +9309,7 @@
id string
permissionsbatchupdaterequest *PermissionsBatchUpdateRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchUpdate: Add or update permission entries to an already existing
@@ -8629,6 +9332,14 @@
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 *RastersPermissionsBatchUpdateCall) Context(ctx context.Context) *RastersPermissionsBatchUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RastersPermissionsBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.permissionsbatchupdaterequest)
@@ -8649,6 +9360,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8701,6 +9415,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all of the permissions for the specified asset.
@@ -8718,6 +9433,14 @@
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 *RastersPermissionsListCall) Context(ctx context.Context) *RastersPermissionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RastersPermissionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8732,6 +9455,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8782,6 +9508,7 @@
s *Service
table *Table
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Create a table asset.
@@ -8799,6 +9526,14 @@
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 *TablesCreateCall) Context(ctx context.Context) *TablesCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.table)
@@ -8817,6 +9552,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8858,6 +9596,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a table.
@@ -8875,6 +9614,14 @@
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 *TablesDeleteCall) Context(ctx context.Context) *TablesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8889,6 +9636,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8931,6 +9681,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Return metadata for a particular table, including the schema.
@@ -8958,6 +9709,14 @@
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 *TablesGetCall) Context(ctx context.Context) *TablesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8975,6 +9734,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9036,6 +9798,7 @@
type TablesListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all tables readable by the current user.
@@ -9167,6 +9930,14 @@
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 *TablesListCall) Context(ctx context.Context) *TablesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9218,6 +9989,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9353,6 +10127,7 @@
id string
table *Table
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Mutate a table asset.
@@ -9371,6 +10146,14 @@
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 *TablesPatchCall) Context(ctx context.Context) *TablesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.table)
@@ -9391,6 +10174,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9436,6 +10222,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Process: Process a table asset.
@@ -9453,6 +10240,14 @@
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 *TablesProcessCall) Context(ctx context.Context) *TablesProcessCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesProcessCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9467,6 +10262,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9516,6 +10314,7 @@
s *Service
table *Table
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Upload: Create a placeholder table asset to which table files can be
@@ -9539,6 +10338,14 @@
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 *TablesUploadCall) Context(ctx context.Context) *TablesUploadCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesUploadCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.table)
@@ -9557,6 +10364,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9599,6 +10409,7 @@
id string
featuresbatchdeleterequest *FeaturesBatchDeleteRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchDelete: Delete all features matching the given IDs.
@@ -9617,6 +10428,14 @@
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 *TablesFeaturesBatchDeleteCall) Context(ctx context.Context) *TablesFeaturesBatchDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesFeaturesBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.featuresbatchdeleterequest)
@@ -9637,6 +10456,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9683,6 +10505,7 @@
id string
featuresbatchinsertrequest *FeaturesBatchInsertRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchInsert: Append features to an existing table.
@@ -9712,6 +10535,14 @@
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 *TablesFeaturesBatchInsertCall) Context(ctx context.Context) *TablesFeaturesBatchInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesFeaturesBatchInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.featuresbatchinsertrequest)
@@ -9732,6 +10563,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9778,6 +10612,7 @@
id string
featuresbatchpatchrequest *FeaturesBatchPatchRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchPatch: Update the supplied features.
@@ -9817,6 +10652,14 @@
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 *TablesFeaturesBatchPatchCall) Context(ctx context.Context) *TablesFeaturesBatchPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesFeaturesBatchPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.featuresbatchpatchrequest)
@@ -9837,6 +10680,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9883,6 +10729,7 @@
tableId string
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Return a single feature, given its ID.
@@ -9920,6 +10767,14 @@
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 *TablesFeaturesGetCall) Context(ctx context.Context) *TablesFeaturesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesFeaturesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9941,6 +10796,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10016,6 +10874,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all features readable by the current user.
@@ -10106,6 +10965,14 @@
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 *TablesFeaturesListCall) Context(ctx context.Context) *TablesFeaturesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesFeaturesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10147,6 +11014,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10256,8 +11126,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Insert: Upload a file to a placeholder table asset. See Table Upload
@@ -10279,10 +11149,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *TablesFilesInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *TablesFilesInsertCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -10307,6 +11179,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *TablesFilesInsertCall) Context(ctx context.Context) *TablesFilesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesFilesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10344,6 +11226,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10433,6 +11318,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all parent ids of the specified table.
@@ -10467,6 +11353,14 @@
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 *TablesParentsListCall) Context(ctx context.Context) *TablesParentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesParentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10487,6 +11381,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10549,6 +11446,7 @@
id string
permissionsbatchdeleterequest *PermissionsBatchDeleteRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchDelete: Remove permission entries from an already existing
@@ -10568,6 +11466,14 @@
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 *TablesPermissionsBatchDeleteCall) Context(ctx context.Context) *TablesPermissionsBatchDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesPermissionsBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.permissionsbatchdeleterequest)
@@ -10588,6 +11494,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10641,6 +11550,7 @@
id string
permissionsbatchupdaterequest *PermissionsBatchUpdateRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchUpdate: Add or update permission entries to an already existing
@@ -10663,6 +11573,14 @@
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 *TablesPermissionsBatchUpdateCall) Context(ctx context.Context) *TablesPermissionsBatchUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesPermissionsBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.permissionsbatchupdaterequest)
@@ -10683,6 +11601,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10735,6 +11656,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Return all of the permissions for the specified asset.
@@ -10752,6 +11674,14 @@
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 *TablesPermissionsListCall) Context(ctx context.Context) *TablesPermissionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TablesPermissionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10766,6 +11696,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/mirror/v1/mirror-gen.go b/mirror/v1/mirror-gen.go
index f249dd7..566a1d2 100644
--- a/mirror/v1/mirror-gen.go
+++ b/mirror/v1/mirror-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "mirror:v1"
const apiName = "mirror"
@@ -749,6 +749,7 @@
accountName string
account *Account
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new account for a user
@@ -769,6 +770,14 @@
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 *AccountsInsertCall) Context(ctx context.Context) *AccountsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
@@ -791,6 +800,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -854,6 +866,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a contact.
@@ -871,6 +884,14 @@
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 *ContactsDeleteCall) Context(ctx context.Context) *ContactsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ContactsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -885,6 +906,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -927,6 +951,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a single contact by ID.
@@ -944,6 +969,14 @@
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 *ContactsGetCall) Context(ctx context.Context) *ContactsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ContactsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -958,6 +991,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1007,6 +1043,7 @@
s *Service
contact *Contact
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new contact.
@@ -1024,6 +1061,14 @@
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 *ContactsInsertCall) Context(ctx context.Context) *ContactsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ContactsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.contact)
@@ -1042,6 +1087,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1082,6 +1130,7 @@
type ContactsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of contacts for the authenticated user.
@@ -1098,6 +1147,14 @@
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 *ContactsListCall) Context(ctx context.Context) *ContactsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ContactsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1110,6 +1167,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1149,6 +1209,7 @@
id string
contact *Contact
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a contact in place. This method supports patch
@@ -1168,6 +1229,14 @@
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 *ContactsPatchCall) Context(ctx context.Context) *ContactsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ContactsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.contact)
@@ -1188,6 +1257,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1241,6 +1313,7 @@
id string
contact *Contact
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a contact in place.
@@ -1259,6 +1332,14 @@
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 *ContactsUpdateCall) Context(ctx context.Context) *ContactsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ContactsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.contact)
@@ -1279,6 +1360,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1331,6 +1415,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a single location by ID.
@@ -1348,6 +1433,14 @@
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 *LocationsGetCall) Context(ctx context.Context) *LocationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LocationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1362,6 +1455,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1411,6 +1507,7 @@
type LocationsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of locations for the user.
@@ -1427,6 +1524,14 @@
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 *LocationsListCall) Context(ctx context.Context) *LocationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LocationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1439,6 +1544,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1478,6 +1586,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a single setting by ID.
@@ -1495,6 +1604,14 @@
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 *SettingsGetCall) Context(ctx context.Context) *SettingsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SettingsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1509,6 +1626,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1558,6 +1678,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a subscription.
@@ -1575,6 +1696,14 @@
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 *SubscriptionsDeleteCall) Context(ctx context.Context) *SubscriptionsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1589,6 +1718,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1631,6 +1763,7 @@
s *Service
subscription *Subscription
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a new subscription.
@@ -1648,6 +1781,14 @@
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 *SubscriptionsInsertCall) Context(ctx context.Context) *SubscriptionsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.subscription)
@@ -1666,6 +1807,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1706,6 +1850,7 @@
type SubscriptionsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of subscriptions for the authenticated user
@@ -1723,6 +1868,14 @@
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 *SubscriptionsListCall) Context(ctx context.Context) *SubscriptionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1735,6 +1888,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1774,6 +1930,7 @@
id string
subscription *Subscription
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing subscription in place.
@@ -1792,6 +1949,14 @@
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 *SubscriptionsUpdateCall) Context(ctx context.Context) *SubscriptionsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.subscription)
@@ -1812,6 +1977,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1864,6 +2032,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a timeline item.
@@ -1881,6 +2050,14 @@
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 *TimelineDeleteCall) Context(ctx context.Context) *TimelineDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TimelineDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1895,6 +2072,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1938,6 +2118,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a single timeline item by ID.
@@ -1955,6 +2136,14 @@
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 *TimelineGetCall) Context(ctx context.Context) *TimelineGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TimelineGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1969,6 +2158,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2022,8 +2214,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Insert: Inserts a new item into the timeline.
@@ -2041,10 +2233,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *TimelineInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *TimelineInsertCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -2069,6 +2263,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *TimelineInsertCall) Context(ctx context.Context) *TimelineInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TimelineInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.timelineitem)
@@ -2106,6 +2310,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2189,6 +2396,7 @@
type TimelineListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of timeline items for the authenticated user.
@@ -2260,6 +2468,14 @@
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 *TimelineListCall) Context(ctx context.Context) *TimelineListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TimelineListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2293,6 +2509,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2379,6 +2598,7 @@
id string
timelineitem *TimelineItem
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a timeline item in place. This method supports patch
@@ -2398,6 +2618,14 @@
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 *TimelinePatchCall) Context(ctx context.Context) *TimelinePatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TimelinePatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.timelineitem)
@@ -2418,6 +2646,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2475,8 +2706,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Update: Updates a timeline item in place.
@@ -2495,10 +2726,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *TimelineUpdateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *TimelineUpdateCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -2523,6 +2756,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *TimelineUpdateCall) Context(ctx context.Context) *TimelineUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TimelineUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.timelineitem)
@@ -2562,6 +2805,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2658,6 +2904,7 @@
itemId string
attachmentId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an attachment from a timeline item.
@@ -2676,6 +2923,14 @@
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 *TimelineAttachmentsDeleteCall) Context(ctx context.Context) *TimelineAttachmentsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TimelineAttachmentsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2691,6 +2946,9 @@
"attachmentId": c.attachmentId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2741,6 +2999,7 @@
itemId string
attachmentId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves an attachment on a timeline item by item ID and
@@ -2760,6 +3019,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *TimelineAttachmentsGetCall) Context(ctx context.Context) *TimelineAttachmentsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TimelineAttachmentsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2775,6 +3042,9 @@
"attachmentId": c.attachmentId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2850,8 +3120,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Insert: Adds a new attachment to a timeline item.
@@ -2869,10 +3139,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *TimelineAttachmentsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *TimelineAttachmentsInsertCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -2897,6 +3169,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *TimelineAttachmentsInsertCall) Context(ctx context.Context) *TimelineAttachmentsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TimelineAttachmentsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2933,6 +3215,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3024,6 +3309,7 @@
s *Service
itemId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns a list of attachments for a timeline item.
@@ -3041,6 +3327,14 @@
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 *TimelineAttachmentsListCall) Context(ctx context.Context) *TimelineAttachmentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TimelineAttachmentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3055,6 +3349,9 @@
"itemId": c.itemId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/oauth2/v1/oauth2-gen.go b/oauth2/v1/oauth2-gen.go
index 4360833..326c413 100644
--- a/oauth2/v1/oauth2-gen.go
+++ b/oauth2/v1/oauth2-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "oauth2:v1"
const apiName = "oauth2"
@@ -235,6 +235,7 @@
type GetCertForOpenIdConnectCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetCertForOpenIdConnect:
@@ -251,6 +252,14 @@
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 *GetCertForOpenIdConnectCall) Context(ctx context.Context) *GetCertForOpenIdConnectCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GetCertForOpenIdConnectCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -263,6 +272,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -296,6 +308,7 @@
type GetCertForOpenIdConnectRawCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetCertForOpenIdConnectRaw:
@@ -312,6 +325,14 @@
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 *GetCertForOpenIdConnectRawCall) Context(ctx context.Context) *GetCertForOpenIdConnectRawCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GetCertForOpenIdConnectRawCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -324,6 +345,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -358,6 +382,7 @@
s *Service
robotEmail string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetRobotJwk:
@@ -375,6 +400,14 @@
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 *GetRobotJwkCall) Context(ctx context.Context) *GetRobotJwkCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GetRobotJwkCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -389,6 +422,9 @@
"robotEmail": c.robotEmail,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -434,6 +470,7 @@
s *Service
robotEmail string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetRobotMetadataRaw:
@@ -451,6 +488,14 @@
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 *GetRobotMetadataRawCall) Context(ctx context.Context) *GetRobotMetadataRawCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GetRobotMetadataRawCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -465,6 +510,9 @@
"robotEmail": c.robotEmail,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -510,6 +558,7 @@
s *Service
robotEmail string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetRobotMetadataX509:
@@ -527,6 +576,14 @@
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 *GetRobotMetadataX509Call) Context(ctx context.Context) *GetRobotMetadataX509Call {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GetRobotMetadataX509Call) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -541,6 +598,9 @@
"robotEmail": c.robotEmail,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -585,6 +645,7 @@
type TokeninfoCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Tokeninfo: Get token info
@@ -614,6 +675,14 @@
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 *TokeninfoCall) Context(ctx context.Context) *TokeninfoCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TokeninfoCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -632,6 +701,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -678,6 +750,7 @@
type UserinfoGetCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get user info
@@ -694,6 +767,14 @@
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 *UserinfoGetCall) Context(ctx context.Context) *UserinfoGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserinfoGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -706,6 +787,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -746,6 +830,7 @@
type UserinfoV2MeGetCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get user info
@@ -762,6 +847,14 @@
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 *UserinfoV2MeGetCall) Context(ctx context.Context) *UserinfoV2MeGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserinfoV2MeGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -774,6 +867,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/oauth2/v2/oauth2-gen.go b/oauth2/v2/oauth2-gen.go
index dcc5634..1b3ea8f 100644
--- a/oauth2/v2/oauth2-gen.go
+++ b/oauth2/v2/oauth2-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "oauth2:v2"
const apiName = "oauth2"
@@ -211,6 +211,7 @@
type GetCertForOpenIdConnectCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetCertForOpenIdConnect:
@@ -227,6 +228,14 @@
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 *GetCertForOpenIdConnectCall) Context(ctx context.Context) *GetCertForOpenIdConnectCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GetCertForOpenIdConnectCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -239,6 +248,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -272,6 +284,7 @@
type TokeninfoCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Tokeninfo:
@@ -306,6 +319,14 @@
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 *TokeninfoCall) Context(ctx context.Context) *TokeninfoCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TokeninfoCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -327,6 +348,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -374,6 +398,7 @@
type UserinfoGetCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get:
@@ -390,6 +415,14 @@
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 *UserinfoGetCall) Context(ctx context.Context) *UserinfoGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserinfoGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -402,6 +435,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -441,6 +477,7 @@
type UserinfoV2MeGetCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get:
@@ -457,6 +494,14 @@
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 *UserinfoV2MeGetCall) Context(ctx context.Context) *UserinfoV2MeGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserinfoV2MeGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -469,6 +514,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/pagespeedonline/v1/pagespeedonline-gen.go b/pagespeedonline/v1/pagespeedonline-gen.go
index cdea627..7ba9b77 100644
--- a/pagespeedonline/v1/pagespeedonline-gen.go
+++ b/pagespeedonline/v1/pagespeedonline-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "pagespeedonline:v1"
const apiName = "pagespeedonline"
@@ -218,6 +218,7 @@
s *Service
url string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Runpagespeed: Runs PageSpeed analysis on the page at the specified
@@ -277,6 +278,14 @@
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 *PagespeedapiRunpagespeedCall) Context(ctx context.Context) *PagespeedapiRunpagespeedCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PagespeedapiRunpagespeedCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -305,6 +314,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/pagespeedonline/v2/pagespeedonline-gen.go b/pagespeedonline/v2/pagespeedonline-gen.go
index 78c9beb..42fa876 100644
--- a/pagespeedonline/v2/pagespeedonline-gen.go
+++ b/pagespeedonline/v2/pagespeedonline-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "pagespeedonline:v2"
const apiName = "pagespeedonline"
@@ -306,6 +306,7 @@
s *Service
url string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Runpagespeed: Runs PageSpeed analysis on the page at the specified
@@ -365,6 +366,14 @@
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 *PagespeedapiRunpagespeedCall) Context(ctx context.Context) *PagespeedapiRunpagespeedCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PagespeedapiRunpagespeedCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -393,6 +402,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/partners/v2/partners-gen.go b/partners/v2/partners-gen.go
index f7257a7..ab2c214 100644
--- a/partners/v2/partners-gen.go
+++ b/partners/v2/partners-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "partners:v2"
const apiName = "partners"
@@ -825,6 +825,7 @@
s *Service
logmessagerequest *LogMessageRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Log: Logs a generic message from the client, such as `Failed to
@@ -844,6 +845,14 @@
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 *ClientMessagesLogCall) Context(ctx context.Context) *ClientMessagesLogCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ClientMessagesLogCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.logmessagerequest)
@@ -862,6 +871,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -900,6 +912,7 @@
s *Service
companyId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a company.
@@ -1011,6 +1024,14 @@
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 *CompaniesGetCall) Context(ctx context.Context) *CompaniesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CompaniesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1058,6 +1079,9 @@
"companyId": c.companyId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1163,6 +1187,7 @@
type CompaniesListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists companies.
@@ -1408,6 +1433,14 @@
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 *CompaniesListCall) Context(ctx context.Context) *CompaniesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CompaniesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1492,6 +1525,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1691,6 +1727,7 @@
companyId string
createleadrequest *CreateLeadRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates an advertiser lead for the given company ID.
@@ -1709,6 +1746,14 @@
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 *CompaniesLeadsCreateCall) Context(ctx context.Context) *CompaniesLeadsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CompaniesLeadsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.createleadrequest)
@@ -1729,6 +1774,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1778,6 +1826,7 @@
s *Service
logusereventrequest *LogUserEventRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Log: Logs a user event.
@@ -1795,6 +1844,14 @@
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 *UserEventsLogCall) Context(ctx context.Context) *UserEventsLogCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserEventsLogCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.logusereventrequest)
@@ -1813,6 +1870,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1850,6 +1910,7 @@
type UserStatesListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists states for current user.
@@ -1922,6 +1983,14 @@
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 *UserStatesListCall) Context(ctx context.Context) *UserStatesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UserStatesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1955,6 +2024,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/playmoviespartner/v1/playmoviespartner-gen.go b/playmoviespartner/v1/playmoviespartner-gen.go
index 4f507ba..17aaed8 100644
--- a/playmoviespartner/v1/playmoviespartner-gen.go
+++ b/playmoviespartner/v1/playmoviespartner-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "playmoviespartner:v1"
const apiName = "playmoviespartner"
@@ -689,6 +689,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List Avails owned or managed by the partner. See
@@ -765,6 +766,14 @@
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 *AccountsAvailsListCall) Context(ctx context.Context) *AccountsAvailsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsAvailsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -803,6 +812,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -898,6 +910,7 @@
accountId string
elId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get an ExperienceLocale given its id. See _Authentication and
@@ -918,6 +931,14 @@
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 *AccountsExperienceLocalesGetCall) Context(ctx context.Context) *AccountsExperienceLocalesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsExperienceLocalesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -933,6 +954,9 @@
"elId": c.elId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -989,6 +1013,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List ExperienceLocales owned or managed by the partner. See
@@ -1081,6 +1106,14 @@
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 *AccountsExperienceLocalesListCall) Context(ctx context.Context) *AccountsExperienceLocalesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsExperienceLocalesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1122,6 +1155,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1229,6 +1265,7 @@
accountId string
orderId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get an Order given its id. See _Authentication and Authorization
@@ -1249,6 +1286,14 @@
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 *AccountsOrdersGetCall) Context(ctx context.Context) *AccountsOrdersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsOrdersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1264,6 +1309,9 @@
"orderId": c.orderId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1320,6 +1368,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List Orders owned or managed by the partner. See
@@ -1396,6 +1445,14 @@
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 *AccountsOrdersListCall) Context(ctx context.Context) *AccountsOrdersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsOrdersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1431,6 +1488,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1527,6 +1587,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List StoreInfos owned or managed by the partner. See
@@ -1604,6 +1665,14 @@
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 *AccountsStoreInfosListCall) Context(ctx context.Context) *AccountsStoreInfosListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsStoreInfosListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1642,6 +1711,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1738,6 +1810,7 @@
videoId string
country string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get a StoreInfo given its video id and country. See
@@ -1759,6 +1832,14 @@
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 *AccountsStoreInfosCountryGetCall) Context(ctx context.Context) *AccountsStoreInfosCountryGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsStoreInfosCountryGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1775,6 +1856,9 @@
"country": c.country,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/plus/v1/plus-gen.go b/plus/v1/plus-gen.go
index eb8d50c..6476a8f 100644
--- a/plus/v1/plus-gen.go
+++ b/plus/v1/plus-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "plus:v1"
const apiName = "plus"
@@ -1283,6 +1283,7 @@
s *Service
activityId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get an activity.
@@ -1300,6 +1301,14 @@
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 *ActivitiesGetCall) Context(ctx context.Context) *ActivitiesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ActivitiesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1314,6 +1323,9 @@
"activityId": c.activityId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1365,6 +1377,7 @@
userId string
collection string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all of the activities in the specified collection for a
@@ -1402,6 +1415,14 @@
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 *ActivitiesListCall) Context(ctx context.Context) *ActivitiesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ActivitiesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1423,6 +1444,9 @@
"collection": c.collection,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1500,6 +1524,7 @@
s *Service
query string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Search: Search public activities.
@@ -1557,6 +1582,14 @@
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 *ActivitiesSearchCall) Context(ctx context.Context) *ActivitiesSearchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ActivitiesSearchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1582,6 +1615,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1666,6 +1702,7 @@
s *Service
commentId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get a comment.
@@ -1683,6 +1720,14 @@
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 *CommentsGetCall) Context(ctx context.Context) *CommentsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1697,6 +1742,9 @@
"commentId": c.commentId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1747,6 +1795,7 @@
s *Service
activityId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all of the comments for an activity.
@@ -1793,6 +1842,14 @@
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 *CommentsListCall) Context(ctx context.Context) *CommentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1816,6 +1873,9 @@
"activityId": c.activityId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1896,6 +1956,7 @@
collection string
moment *Moment
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Record a moment representing a user's action such as making a
@@ -1923,6 +1984,14 @@
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 *MomentsInsertCall) Context(ctx context.Context) *MomentsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MomentsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.moment)
@@ -1947,6 +2016,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2019,6 +2091,7 @@
userId string
collection string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all of the moments for a particular user.
@@ -2069,6 +2142,14 @@
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 *MomentsListCall) Context(ctx context.Context) *MomentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MomentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2096,6 +2177,9 @@
"collection": c.collection,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2183,6 +2267,7 @@
s *Service
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get a person's profile. If your app uses scope
@@ -2202,6 +2287,14 @@
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 *PeopleGetCall) Context(ctx context.Context) *PeopleGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PeopleGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2216,6 +2309,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2269,6 +2365,7 @@
userId string
collection string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all of the people in the specified collection.
@@ -2316,6 +2413,14 @@
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 *PeopleListCall) Context(ctx context.Context) *PeopleListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PeopleListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2340,6 +2445,9 @@
"collection": c.collection,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2433,6 +2541,7 @@
activityId string
collection string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ListByActivity: List all of the people in the specified collection
@@ -2470,6 +2579,14 @@
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 *PeopleListByActivityCall) Context(ctx context.Context) *PeopleListByActivityCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PeopleListByActivityCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2491,6 +2608,9 @@
"collection": c.collection,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2570,6 +2690,7 @@
s *Service
query string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Search: Search all public profiles.
@@ -2614,6 +2735,14 @@
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 *PeopleSearchCall) Context(ctx context.Context) *PeopleSearchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PeopleSearchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2636,6 +2765,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/plusdomains/v1/plusdomains-gen.go b/plusdomains/v1/plusdomains-gen.go
index cc0cf10..13982e7 100644
--- a/plusdomains/v1/plusdomains-gen.go
+++ b/plusdomains/v1/plusdomains-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "plusDomains:v1"
const apiName = "plusDomains"
@@ -1285,6 +1285,7 @@
s *Service
activityId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get an activity.
@@ -1302,6 +1303,14 @@
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 *ActivitiesGetCall) Context(ctx context.Context) *ActivitiesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ActivitiesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1316,6 +1325,9 @@
"activityId": c.activityId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1368,6 +1380,7 @@
userId string
activity *Activity
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Create a new activity for the authenticated user.
@@ -1395,6 +1408,14 @@
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 *ActivitiesInsertCall) Context(ctx context.Context) *ActivitiesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ActivitiesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.activity)
@@ -1418,6 +1439,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1478,6 +1502,7 @@
userId string
collection string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all of the activities in the specified collection for a
@@ -1515,6 +1540,14 @@
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 *ActivitiesListCall) Context(ctx context.Context) *ActivitiesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ActivitiesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1536,6 +1569,9 @@
"collection": c.collection,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1614,6 +1650,7 @@
s *Service
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all of the audiences to which a user can share.
@@ -1649,6 +1686,14 @@
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 *AudiencesListCall) Context(ctx context.Context) *AudiencesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AudiencesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1669,6 +1714,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1734,6 +1782,7 @@
s *Service
circleId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AddPeople: Add a person to a circle. Google+ limits certain circle
@@ -1766,6 +1815,14 @@
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 *CirclesAddPeopleCall) Context(ctx context.Context) *CirclesAddPeopleCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CirclesAddPeopleCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1786,6 +1843,9 @@
"circleId": c.circleId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1848,6 +1908,7 @@
s *Service
circleId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get a circle.
@@ -1865,6 +1926,14 @@
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 *CirclesGetCall) Context(ctx context.Context) *CirclesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CirclesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1879,6 +1948,9 @@
"circleId": c.circleId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1930,6 +2002,7 @@
userId string
circle *Circle
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Create a new circle for the authenticated user.
@@ -1948,6 +2021,14 @@
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 *CirclesInsertCall) Context(ctx context.Context) *CirclesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CirclesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.circle)
@@ -1968,6 +2049,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2022,6 +2106,7 @@
s *Service
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all of the circles for a user.
@@ -2057,6 +2142,14 @@
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 *CirclesListCall) Context(ctx context.Context) *CirclesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CirclesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2077,6 +2170,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2143,6 +2239,7 @@
circleId string
circle *Circle
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Update a circle's description. This method supports patch
@@ -2162,6 +2259,14 @@
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 *CirclesPatchCall) Context(ctx context.Context) *CirclesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CirclesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.circle)
@@ -2182,6 +2287,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2235,6 +2343,7 @@
s *Service
circleId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Remove: Delete a circle.
@@ -2252,6 +2361,14 @@
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 *CirclesRemoveCall) Context(ctx context.Context) *CirclesRemoveCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CirclesRemoveCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2266,6 +2383,9 @@
"circleId": c.circleId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2309,6 +2429,7 @@
s *Service
circleId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// RemovePeople: Remove a person from a circle.
@@ -2340,6 +2461,14 @@
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 *CirclesRemovePeopleCall) Context(ctx context.Context) *CirclesRemovePeopleCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CirclesRemovePeopleCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2360,6 +2489,9 @@
"circleId": c.circleId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2416,6 +2548,7 @@
circleId string
circle *Circle
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Update a circle's description.
@@ -2434,6 +2567,14 @@
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 *CirclesUpdateCall) Context(ctx context.Context) *CirclesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CirclesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.circle)
@@ -2454,6 +2595,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2507,6 +2651,7 @@
s *Service
commentId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get a comment.
@@ -2524,6 +2669,14 @@
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 *CommentsGetCall) Context(ctx context.Context) *CommentsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2538,6 +2691,9 @@
"commentId": c.commentId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2589,6 +2745,7 @@
activityId string
comment *Comment
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Create a new comment in reply to an activity.
@@ -2607,6 +2764,14 @@
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 *CommentsInsertCall) Context(ctx context.Context) *CommentsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.comment)
@@ -2627,6 +2792,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2680,6 +2848,7 @@
s *Service
activityId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all of the comments for an activity.
@@ -2726,6 +2895,14 @@
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 *CommentsListCall) Context(ctx context.Context) *CommentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2749,6 +2926,9 @@
"activityId": c.activityId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2832,8 +3012,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Insert: Add a new media item to an album. The current upload size
@@ -2856,10 +3036,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *MediaInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *MediaInsertCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -2884,6 +3066,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *MediaInsertCall) Context(ctx context.Context) *MediaInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *MediaInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.media)
@@ -2924,6 +3116,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3030,6 +3225,7 @@
s *Service
userId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get a person's profile.
@@ -3047,6 +3243,14 @@
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 *PeopleGetCall) Context(ctx context.Context) *PeopleGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PeopleGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3061,6 +3265,9 @@
"userId": c.userId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3115,6 +3322,7 @@
userId string
collection string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all of the people in the specified collection.
@@ -3162,6 +3370,14 @@
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 *PeopleListCall) Context(ctx context.Context) *PeopleListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PeopleListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3186,6 +3402,9 @@
"collection": c.collection,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3278,6 +3497,7 @@
activityId string
collection string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ListByActivity: List all of the people in the specified collection
@@ -3315,6 +3535,14 @@
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 *PeopleListByActivityCall) Context(ctx context.Context) *PeopleListByActivityCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PeopleListByActivityCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3336,6 +3564,9 @@
"collection": c.collection,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3417,6 +3648,7 @@
s *Service
circleId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ListByCircle: List all of the people who are members of a circle.
@@ -3452,6 +3684,14 @@
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 *PeopleListByCircleCall) Context(ctx context.Context) *PeopleListByCircleCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PeopleListByCircleCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3472,6 +3712,9 @@
"circleId": c.circleId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/prediction/v1.2/prediction-gen.go b/prediction/v1.2/prediction-gen.go
index ea1001b..f8013a3 100644
--- a/prediction/v1.2/prediction-gen.go
+++ b/prediction/v1.2/prediction-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "prediction:v1.2"
const apiName = "prediction"
@@ -164,6 +164,7 @@
data string
input *Input
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Predict: Submit data and request a prediction
@@ -182,6 +183,14 @@
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 *PredictCall) Context(ctx context.Context) *PredictCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PredictCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.input)
@@ -202,6 +211,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -255,6 +267,7 @@
hostedModelName string
input *Input
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Predict: Submit input and request an output against a hosted model
@@ -273,6 +286,14 @@
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 *HostedmodelsPredictCall) Context(ctx context.Context) *HostedmodelsPredictCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *HostedmodelsPredictCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.input)
@@ -293,6 +314,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -345,6 +369,7 @@
s *Service
data string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a trained model
@@ -362,6 +387,14 @@
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 *TrainingDeleteCall) Context(ctx context.Context) *TrainingDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TrainingDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -376,6 +409,9 @@
"data": c.data,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -418,6 +454,7 @@
s *Service
data string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Check training status of your model
@@ -435,6 +472,14 @@
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 *TrainingGetCall) Context(ctx context.Context) *TrainingGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TrainingGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -449,6 +494,9 @@
"data": c.data,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -498,6 +546,7 @@
s *Service
training *Training
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Begin training your model
@@ -522,6 +571,14 @@
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 *TrainingInsertCall) Context(ctx context.Context) *TrainingInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TrainingInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.training)
@@ -543,6 +600,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -595,6 +655,7 @@
data string
update *Update
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Add new data to a trained model
@@ -613,6 +674,14 @@
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 *TrainingUpdateCall) Context(ctx context.Context) *TrainingUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TrainingUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.update)
@@ -633,6 +702,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/prediction/v1.3/prediction-gen.go b/prediction/v1.3/prediction-gen.go
index e2da74b..8420a94 100644
--- a/prediction/v1.3/prediction-gen.go
+++ b/prediction/v1.3/prediction-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "prediction:v1.3"
const apiName = "prediction"
@@ -241,6 +241,7 @@
hostedModelName string
input *Input
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Predict: Submit input and request an output against a hosted model
@@ -259,6 +260,14 @@
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 *HostedmodelsPredictCall) Context(ctx context.Context) *HostedmodelsPredictCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *HostedmodelsPredictCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.input)
@@ -279,6 +288,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -331,6 +343,7 @@
s *Service
data string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a trained model
@@ -348,6 +361,14 @@
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 *TrainingDeleteCall) Context(ctx context.Context) *TrainingDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TrainingDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -362,6 +383,9 @@
"data": c.data,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -404,6 +428,7 @@
s *Service
data string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Check training status of your model
@@ -421,6 +446,14 @@
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 *TrainingGetCall) Context(ctx context.Context) *TrainingGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TrainingGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -435,6 +468,9 @@
"data": c.data,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -484,6 +520,7 @@
s *Service
training *Training
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Begin training your model
@@ -501,6 +538,14 @@
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 *TrainingInsertCall) Context(ctx context.Context) *TrainingInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TrainingInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.training)
@@ -519,6 +564,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -564,6 +612,7 @@
data string
input *Input
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Predict: Submit data and request a prediction
@@ -582,6 +631,14 @@
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 *TrainingPredictCall) Context(ctx context.Context) *TrainingPredictCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TrainingPredictCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.input)
@@ -602,6 +659,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -655,6 +715,7 @@
data string
update *Update
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Add new data to a trained model
@@ -673,6 +734,14 @@
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 *TrainingUpdateCall) Context(ctx context.Context) *TrainingUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TrainingUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.update)
@@ -693,6 +762,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/prediction/v1.4/prediction-gen.go b/prediction/v1.4/prediction-gen.go
index bebad58..389e587 100644
--- a/prediction/v1.4/prediction-gen.go
+++ b/prediction/v1.4/prediction-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "prediction:v1.4"
const apiName = "prediction"
@@ -265,6 +265,7 @@
hostedModelName string
input *Input
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Predict: Submit input and request an output against a hosted model.
@@ -283,6 +284,14 @@
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 *HostedmodelsPredictCall) Context(ctx context.Context) *HostedmodelsPredictCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *HostedmodelsPredictCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.input)
@@ -303,6 +312,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -355,6 +367,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a trained model.
@@ -372,6 +385,14 @@
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 *TrainedmodelsDeleteCall) Context(ctx context.Context) *TrainedmodelsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TrainedmodelsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -386,6 +407,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -428,6 +452,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Check training status of your model.
@@ -445,6 +470,14 @@
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 *TrainedmodelsGetCall) Context(ctx context.Context) *TrainedmodelsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TrainedmodelsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -459,6 +492,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -508,6 +544,7 @@
s *Service
training *Training
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Begin training your model.
@@ -525,6 +562,14 @@
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 *TrainedmodelsInsertCall) Context(ctx context.Context) *TrainedmodelsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TrainedmodelsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.training)
@@ -543,6 +588,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -588,6 +636,7 @@
id string
input *Input
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Predict: Submit model id and request a prediction
@@ -606,6 +655,14 @@
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 *TrainedmodelsPredictCall) Context(ctx context.Context) *TrainedmodelsPredictCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TrainedmodelsPredictCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.input)
@@ -626,6 +683,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -679,6 +739,7 @@
id string
update *Update
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Add new data to a trained model.
@@ -697,6 +758,14 @@
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 *TrainedmodelsUpdateCall) Context(ctx context.Context) *TrainedmodelsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TrainedmodelsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.update)
@@ -717,6 +786,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/prediction/v1.5/prediction-gen.go b/prediction/v1.5/prediction-gen.go
index efbdddf..40ad0f0 100644
--- a/prediction/v1.5/prediction-gen.go
+++ b/prediction/v1.5/prediction-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "prediction:v1.5"
const apiName = "prediction"
@@ -412,6 +412,7 @@
hostedModelName string
input *Input
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Predict: Submit input and request an output against a hosted model.
@@ -430,6 +431,14 @@
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 *HostedmodelsPredictCall) Context(ctx context.Context) *HostedmodelsPredictCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *HostedmodelsPredictCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.input)
@@ -450,6 +459,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -502,6 +514,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Analyze: Get analysis of the model and the data the model was trained
@@ -520,6 +533,14 @@
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 *TrainedmodelsAnalyzeCall) Context(ctx context.Context) *TrainedmodelsAnalyzeCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TrainedmodelsAnalyzeCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -534,6 +555,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -583,6 +607,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a trained model.
@@ -600,6 +625,14 @@
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 *TrainedmodelsDeleteCall) Context(ctx context.Context) *TrainedmodelsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TrainedmodelsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -614,6 +647,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -656,6 +692,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Check training status of your model.
@@ -673,6 +710,14 @@
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 *TrainedmodelsGetCall) Context(ctx context.Context) *TrainedmodelsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TrainedmodelsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -687,6 +732,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -736,6 +784,7 @@
s *Service
training *Training
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Begin training your model.
@@ -753,6 +802,14 @@
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 *TrainedmodelsInsertCall) Context(ctx context.Context) *TrainedmodelsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TrainedmodelsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.training)
@@ -771,6 +828,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -814,6 +874,7 @@
type TrainedmodelsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List available models.
@@ -843,6 +904,14 @@
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 *TrainedmodelsListCall) Context(ctx context.Context) *TrainedmodelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TrainedmodelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -861,6 +930,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -914,6 +986,7 @@
id string
input *Input
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Predict: Submit model id and request a prediction.
@@ -932,6 +1005,14 @@
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 *TrainedmodelsPredictCall) Context(ctx context.Context) *TrainedmodelsPredictCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TrainedmodelsPredictCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.input)
@@ -952,6 +1033,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1005,6 +1089,7 @@
id string
update *Update
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Add new data to a trained model.
@@ -1023,6 +1108,14 @@
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 *TrainedmodelsUpdateCall) Context(ctx context.Context) *TrainedmodelsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TrainedmodelsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.update)
@@ -1043,6 +1136,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/prediction/v1.6/prediction-gen.go b/prediction/v1.6/prediction-gen.go
index d250dea..e5dc4f3 100644
--- a/prediction/v1.6/prediction-gen.go
+++ b/prediction/v1.6/prediction-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "prediction:v1.6"
const apiName = "prediction"
@@ -429,6 +429,7 @@
hostedModelName string
input *Input
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Predict: Submit input and request an output against a hosted model.
@@ -448,6 +449,14 @@
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 *HostedmodelsPredictCall) Context(ctx context.Context) *HostedmodelsPredictCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *HostedmodelsPredictCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.input)
@@ -469,6 +478,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -529,6 +541,7 @@
project string
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Analyze: Get analysis of the model and the data the model was trained
@@ -548,6 +561,14 @@
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 *TrainedmodelsAnalyzeCall) Context(ctx context.Context) *TrainedmodelsAnalyzeCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TrainedmodelsAnalyzeCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -563,6 +584,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -620,6 +644,7 @@
project string
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a trained model.
@@ -638,6 +663,14 @@
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 *TrainedmodelsDeleteCall) Context(ctx context.Context) *TrainedmodelsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TrainedmodelsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -653,6 +686,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -703,6 +739,7 @@
project string
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Check training status of your model.
@@ -721,6 +758,14 @@
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 *TrainedmodelsGetCall) Context(ctx context.Context) *TrainedmodelsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TrainedmodelsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -736,6 +781,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -793,6 +841,7 @@
project string
insert *Insert
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Train a Prediction API model.
@@ -811,6 +860,14 @@
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 *TrainedmodelsInsertCall) Context(ctx context.Context) *TrainedmodelsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TrainedmodelsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.insert)
@@ -831,6 +888,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -886,6 +946,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List available models.
@@ -916,6 +977,14 @@
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 *TrainedmodelsListCall) Context(ctx context.Context) *TrainedmodelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TrainedmodelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -936,6 +1005,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -999,6 +1071,7 @@
id string
input *Input
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Predict: Submit model id and request a prediction.
@@ -1018,6 +1091,14 @@
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 *TrainedmodelsPredictCall) Context(ctx context.Context) *TrainedmodelsPredictCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TrainedmodelsPredictCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.input)
@@ -1039,6 +1120,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1100,6 +1184,7 @@
id string
update *Update
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Add new data to a trained model.
@@ -1119,6 +1204,14 @@
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 *TrainedmodelsUpdateCall) Context(ctx context.Context) *TrainedmodelsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TrainedmodelsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.update)
@@ -1140,6 +1233,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/proximitybeacon/v1beta1/proximitybeacon-gen.go b/proximitybeacon/v1beta1/proximitybeacon-gen.go
index ffe138c..6d6467d 100644
--- a/proximitybeacon/v1beta1/proximitybeacon-gen.go
+++ b/proximitybeacon/v1beta1/proximitybeacon-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "proximitybeacon:v1beta1"
const apiName = "proximitybeacon"
@@ -470,6 +470,7 @@
s *Service
getinfoforobservedbeaconsrequest *GetInfoForObservedBeaconsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Getforobserved: Given one or more beacon observations, returns any
@@ -488,6 +489,14 @@
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 *BeaconinfoGetforobservedCall) Context(ctx context.Context) *BeaconinfoGetforobservedCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BeaconinfoGetforobservedCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.getinfoforobservedbeaconsrequest)
@@ -506,6 +515,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -544,6 +556,7 @@
s *Service
beaconName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Activate: (Re)activates a beacon. A beacon that is active will return
@@ -564,6 +577,14 @@
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 *BeaconsActivateCall) Context(ctx context.Context) *BeaconsActivateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BeaconsActivateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -578,6 +599,9 @@
"beaconName": c.beaconName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -625,6 +649,7 @@
s *Service
beaconName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Deactivate: Deactivates a beacon. Once deactivated, the API will not
@@ -646,6 +671,14 @@
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 *BeaconsDeactivateCall) Context(ctx context.Context) *BeaconsDeactivateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BeaconsDeactivateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -660,6 +693,9 @@
"beaconName": c.beaconName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -707,6 +743,7 @@
s *Service
beaconName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Decommission: Decommissions the specified beacon in the service. This
@@ -727,6 +764,14 @@
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 *BeaconsDecommissionCall) Context(ctx context.Context) *BeaconsDecommissionCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BeaconsDecommissionCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -741,6 +786,9 @@
"beaconName": c.beaconName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -788,6 +836,7 @@
s *Service
beaconName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns detailed information about the specified beacon.
@@ -805,6 +854,14 @@
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 *BeaconsGetCall) Context(ctx context.Context) *BeaconsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BeaconsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -819,6 +876,9 @@
"beaconName": c.beaconName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -865,6 +925,7 @@
type BeaconsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Searches the beacon registry for beacons that match the given
@@ -950,6 +1011,14 @@
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 *BeaconsListCall) Context(ctx context.Context) *BeaconsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BeaconsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -971,6 +1040,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1024,6 +1096,7 @@
s *Service
beacon *Beacon
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Register: Registers a previously unregistered beacon given its
@@ -1043,6 +1116,14 @@
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 *BeaconsRegisterCall) Context(ctx context.Context) *BeaconsRegisterCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BeaconsRegisterCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.beacon)
@@ -1061,6 +1142,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1100,6 +1184,7 @@
beaconName string
beacon *Beacon
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates the information about the specified beacon. **Any
@@ -1124,6 +1209,14 @@
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 *BeaconsUpdateCall) Context(ctx context.Context) *BeaconsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BeaconsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.beacon)
@@ -1144,6 +1237,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1194,6 +1290,7 @@
s *Service
beaconName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BatchDelete: Deletes multiple attachments on a given beacon. This
@@ -1225,6 +1322,14 @@
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 *BeaconsAttachmentsBatchDeleteCall) Context(ctx context.Context) *BeaconsAttachmentsBatchDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BeaconsAttachmentsBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1242,6 +1347,9 @@
"beaconName": c.beaconName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1295,6 +1403,7 @@
beaconName string
beaconattachment *BeaconAttachment
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Associates the given data with the specified beacon.
@@ -1321,6 +1430,14 @@
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 *BeaconsAttachmentsCreateCall) Context(ctx context.Context) *BeaconsAttachmentsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BeaconsAttachmentsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.beaconattachment)
@@ -1341,6 +1458,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1391,6 +1511,7 @@
s *Service
attachmentName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified attachment for the given beacon. Each
@@ -1412,6 +1533,14 @@
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 *BeaconsAttachmentsDeleteCall) Context(ctx context.Context) *BeaconsAttachmentsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BeaconsAttachmentsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1426,6 +1555,9 @@
"attachmentName": c.attachmentName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1473,6 +1605,7 @@
s *Service
beaconName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns the attachments for the specified beacon that match the
@@ -1504,6 +1637,14 @@
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 *BeaconsAttachmentsListCall) Context(ctx context.Context) *BeaconsAttachmentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BeaconsAttachmentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1521,6 +1662,9 @@
"beaconName": c.beaconName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1573,6 +1717,7 @@
s *Service
beaconName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List the diagnostics for a single beacon. You can also list
@@ -1620,6 +1765,14 @@
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 *BeaconsDiagnosticsListCall) Context(ctx context.Context) *BeaconsDiagnosticsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BeaconsDiagnosticsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1643,6 +1796,9 @@
"beaconName": c.beaconName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1710,6 +1866,7 @@
type NamespacesListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all attachment namespaces owned by your Google Developers
@@ -1729,6 +1886,14 @@
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 *NamespacesListCall) Context(ctx context.Context) *NamespacesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *NamespacesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1741,6 +1906,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/pubsub/v1/pubsub-gen.go b/pubsub/v1/pubsub-gen.go
index ea9713e..58f70f5 100644
--- a/pubsub/v1/pubsub-gen.go
+++ b/pubsub/v1/pubsub-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "pubsub:v1"
const apiName = "pubsub"
@@ -413,6 +413,7 @@
subscription string
acknowledgerequest *AcknowledgeRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Acknowledge: Acknowledges the messages associated with the ack tokens
@@ -436,6 +437,14 @@
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 *ProjectsSubscriptionsAcknowledgeCall) Context(ctx context.Context) *ProjectsSubscriptionsAcknowledgeCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSubscriptionsAcknowledgeCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.acknowledgerequest)
@@ -456,6 +465,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -511,6 +523,7 @@
name string
subscription *Subscription
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a subscription to a given topic for a given
@@ -534,6 +547,14 @@
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 *ProjectsSubscriptionsCreateCall) Context(ctx context.Context) *ProjectsSubscriptionsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSubscriptionsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.subscription)
@@ -554,6 +575,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -608,6 +632,7 @@
s *Service
subscription string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing subscription. All pending messages in the
@@ -630,6 +655,14 @@
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 *ProjectsSubscriptionsDeleteCall) Context(ctx context.Context) *ProjectsSubscriptionsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSubscriptionsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -644,6 +677,9 @@
"subscription": c.subscription,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -695,6 +731,7 @@
s *Service
subscription string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the configuration details of a subscription.
@@ -712,6 +749,14 @@
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 *ProjectsSubscriptionsGetCall) Context(ctx context.Context) *ProjectsSubscriptionsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSubscriptionsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -726,6 +771,9 @@
"subscription": c.subscription,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -777,6 +825,7 @@
s *Service
resource string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetIamPolicy: Gets the access control policy for a resource. Is empty
@@ -795,6 +844,14 @@
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 *ProjectsSubscriptionsGetIamPolicyCall) Context(ctx context.Context) *ProjectsSubscriptionsGetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSubscriptionsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -809,6 +866,9 @@
"resource": c.resource,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -860,6 +920,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists matching subscriptions.
@@ -893,6 +954,14 @@
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 *ProjectsSubscriptionsListCall) Context(ctx context.Context) *ProjectsSubscriptionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSubscriptionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -913,6 +982,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -976,6 +1048,7 @@
subscription string
modifyackdeadlinerequest *ModifyAckDeadlineRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ModifyAckDeadline: Modifies the ack deadline for a specific message.
@@ -997,6 +1070,14 @@
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 *ProjectsSubscriptionsModifyAckDeadlineCall) Context(ctx context.Context) *ProjectsSubscriptionsModifyAckDeadlineCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSubscriptionsModifyAckDeadlineCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.modifyackdeadlinerequest)
@@ -1017,6 +1098,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1072,6 +1156,7 @@
subscription string
modifypushconfigrequest *ModifyPushConfigRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ModifyPushConfig: Modifies the PushConfig for a specified
@@ -1095,6 +1180,14 @@
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 *ProjectsSubscriptionsModifyPushConfigCall) Context(ctx context.Context) *ProjectsSubscriptionsModifyPushConfigCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSubscriptionsModifyPushConfigCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.modifypushconfigrequest)
@@ -1115,6 +1208,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1170,6 +1266,7 @@
subscription string
pullrequest *PullRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Pull: Pulls messages from the server. Returns an empty list if there
@@ -1191,6 +1288,14 @@
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 *ProjectsSubscriptionsPullCall) Context(ctx context.Context) *ProjectsSubscriptionsPullCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSubscriptionsPullCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.pullrequest)
@@ -1211,6 +1316,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1266,6 +1374,7 @@
resource string
setiampolicyrequest *SetIamPolicyRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetIamPolicy: Sets the access control policy on the specified
@@ -1285,6 +1394,14 @@
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 *ProjectsSubscriptionsSetIamPolicyCall) Context(ctx context.Context) *ProjectsSubscriptionsSetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSubscriptionsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
@@ -1305,6 +1422,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1360,6 +1480,7 @@
resource string
testiampermissionsrequest *TestIamPermissionsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// TestIamPermissions: Returns permissions that a caller has on the
@@ -1379,6 +1500,14 @@
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 *ProjectsSubscriptionsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsSubscriptionsTestIamPermissionsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSubscriptionsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
@@ -1399,6 +1528,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1454,6 +1586,7 @@
name string
topic *Topic
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates the given topic with the given name.
@@ -1472,6 +1605,14 @@
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 *ProjectsTopicsCreateCall) Context(ctx context.Context) *ProjectsTopicsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsTopicsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.topic)
@@ -1492,6 +1633,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1546,6 +1690,7 @@
s *Service
topic string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the topic with the given name. Returns NOT_FOUND if
@@ -1568,6 +1713,14 @@
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 *ProjectsTopicsDeleteCall) Context(ctx context.Context) *ProjectsTopicsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsTopicsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1582,6 +1735,9 @@
"topic": c.topic,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1633,6 +1789,7 @@
s *Service
topic string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the configuration of a topic.
@@ -1650,6 +1807,14 @@
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 *ProjectsTopicsGetCall) Context(ctx context.Context) *ProjectsTopicsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsTopicsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1664,6 +1829,9 @@
"topic": c.topic,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1715,6 +1883,7 @@
s *Service
resource string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetIamPolicy: Gets the access control policy for a resource. Is empty
@@ -1733,6 +1902,14 @@
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 *ProjectsTopicsGetIamPolicyCall) Context(ctx context.Context) *ProjectsTopicsGetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsTopicsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1747,6 +1924,9 @@
"resource": c.resource,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1798,6 +1978,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists matching topics.
@@ -1831,6 +2012,14 @@
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 *ProjectsTopicsListCall) Context(ctx context.Context) *ProjectsTopicsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsTopicsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1851,6 +2040,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1914,6 +2106,7 @@
topic string
publishrequest *PublishRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Publish: Adds one or more messages to the topic. Returns NOT_FOUND if
@@ -1935,6 +2128,14 @@
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 *ProjectsTopicsPublishCall) Context(ctx context.Context) *ProjectsTopicsPublishCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsTopicsPublishCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.publishrequest)
@@ -1955,6 +2156,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2010,6 +2214,7 @@
resource string
setiampolicyrequest *SetIamPolicyRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetIamPolicy: Sets the access control policy on the specified
@@ -2029,6 +2234,14 @@
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 *ProjectsTopicsSetIamPolicyCall) Context(ctx context.Context) *ProjectsTopicsSetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsTopicsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
@@ -2049,6 +2262,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2104,6 +2320,7 @@
resource string
testiampermissionsrequest *TestIamPermissionsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// TestIamPermissions: Returns permissions that a caller has on the
@@ -2123,6 +2340,14 @@
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 *ProjectsTopicsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsTopicsTestIamPermissionsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsTopicsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
@@ -2143,6 +2368,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2197,6 +2425,7 @@
s *Service
topic string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the name of the subscriptions for this topic.
@@ -2230,6 +2459,14 @@
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 *ProjectsTopicsSubscriptionsListCall) Context(ctx context.Context) *ProjectsTopicsSubscriptionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsTopicsSubscriptionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2250,6 +2487,9 @@
"topic": c.topic,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/pubsub/v1beta1/pubsub-gen.go b/pubsub/v1beta1/pubsub-gen.go
index 70fc6bb..b9b961d 100644
--- a/pubsub/v1beta1/pubsub-gen.go
+++ b/pubsub/v1beta1/pubsub-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "pubsub:v1beta1"
const apiName = "pubsub"
@@ -360,6 +360,7 @@
s *Service
acknowledgerequest *AcknowledgeRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Acknowledge: Acknowledges a particular received message: the Pub/Sub
@@ -382,6 +383,14 @@
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 *SubscriptionsAcknowledgeCall) Context(ctx context.Context) *SubscriptionsAcknowledgeCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsAcknowledgeCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.acknowledgerequest)
@@ -400,6 +409,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -435,6 +447,7 @@
s *Service
subscription *Subscription
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a subscription on a given topic for a given
@@ -458,6 +471,14 @@
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 *SubscriptionsCreateCall) Context(ctx context.Context) *SubscriptionsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.subscription)
@@ -476,6 +497,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -518,6 +542,7 @@
s *Service
subscription string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing subscription. All pending messages in the
@@ -537,6 +562,14 @@
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 *SubscriptionsDeleteCall) Context(ctx context.Context) *SubscriptionsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -551,6 +584,9 @@
"subscription": c.subscription,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -594,6 +630,7 @@
s *Service
subscription string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the configuration details of a subscription.
@@ -611,6 +648,14 @@
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 *SubscriptionsGetCall) Context(ctx context.Context) *SubscriptionsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -625,6 +670,9 @@
"subscription": c.subscription,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -674,6 +722,7 @@
type SubscriptionsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists matching subscriptions.
@@ -711,6 +760,14 @@
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 *SubscriptionsListCall) Context(ctx context.Context) *SubscriptionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -732,6 +789,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -789,6 +849,7 @@
s *Service
modifyackdeadlinerequest *ModifyAckDeadlineRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ModifyAckDeadline: Modifies the Ack deadline for a message received
@@ -807,6 +868,14 @@
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 *SubscriptionsModifyAckDeadlineCall) Context(ctx context.Context) *SubscriptionsModifyAckDeadlineCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsModifyAckDeadlineCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.modifyackdeadlinerequest)
@@ -825,6 +894,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -860,6 +932,7 @@
s *Service
modifypushconfigrequest *ModifyPushConfigRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ModifyPushConfig: Modifies the PushConfig for a specified
@@ -881,6 +954,14 @@
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 *SubscriptionsModifyPushConfigCall) Context(ctx context.Context) *SubscriptionsModifyPushConfigCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsModifyPushConfigCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.modifypushconfigrequest)
@@ -899,6 +980,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -934,6 +1018,7 @@
s *Service
pullrequest *PullRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Pull: Pulls a single message from the server. If return_immediately
@@ -955,6 +1040,14 @@
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 *SubscriptionsPullCall) Context(ctx context.Context) *SubscriptionsPullCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsPullCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.pullrequest)
@@ -973,6 +1066,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1015,6 +1111,7 @@
s *Service
pullbatchrequest *PullBatchRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// PullBatch: Pulls messages from the server. Returns an empty list if
@@ -1035,6 +1132,14 @@
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 *SubscriptionsPullBatchCall) Context(ctx context.Context) *SubscriptionsPullBatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsPullBatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.pullbatchrequest)
@@ -1053,6 +1158,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1095,6 +1203,7 @@
s *Service
topic *Topic
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates the given topic with the given name.
@@ -1112,6 +1221,14 @@
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 *TopicsCreateCall) Context(ctx context.Context) *TopicsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TopicsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.topic)
@@ -1130,6 +1247,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1172,6 +1292,7 @@
s *Service
topic string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the topic with the given name. Returns NOT_FOUND if
@@ -1191,6 +1312,14 @@
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 *TopicsDeleteCall) Context(ctx context.Context) *TopicsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TopicsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1205,6 +1334,9 @@
"topic": c.topic,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1248,6 +1380,7 @@
s *Service
topic string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the configuration of a topic. Since the topic only has the
@@ -1268,6 +1401,14 @@
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 *TopicsGetCall) Context(ctx context.Context) *TopicsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TopicsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1282,6 +1423,9 @@
"topic": c.topic,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1331,6 +1475,7 @@
type TopicsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists matching topics.
@@ -1368,6 +1513,14 @@
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 *TopicsListCall) Context(ctx context.Context) *TopicsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TopicsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1389,6 +1542,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1446,6 +1602,7 @@
s *Service
publishrequest *PublishRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Publish: Adds a message to the topic. Returns NOT_FOUND if the topic
@@ -1464,6 +1621,14 @@
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 *TopicsPublishCall) Context(ctx context.Context) *TopicsPublishCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TopicsPublishCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.publishrequest)
@@ -1482,6 +1647,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1517,6 +1685,7 @@
s *Service
publishbatchrequest *PublishBatchRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// PublishBatch: Adds one or more messages to the topic. Returns
@@ -1535,6 +1704,14 @@
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 *TopicsPublishBatchCall) Context(ctx context.Context) *TopicsPublishBatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TopicsPublishBatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.publishbatchrequest)
@@ -1553,6 +1730,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/pubsub/v1beta1a/pubsub-gen.go b/pubsub/v1beta1a/pubsub-gen.go
index e9c3944..71057f4 100644
--- a/pubsub/v1beta1a/pubsub-gen.go
+++ b/pubsub/v1beta1a/pubsub-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "pubsub:v1beta1a"
const apiName = "pubsub"
@@ -360,6 +360,7 @@
s *Service
acknowledgerequest *AcknowledgeRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Acknowledge: Acknowledges a particular received message: the Pub/Sub
@@ -382,6 +383,14 @@
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 *SubscriptionsAcknowledgeCall) Context(ctx context.Context) *SubscriptionsAcknowledgeCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsAcknowledgeCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.acknowledgerequest)
@@ -400,6 +409,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -442,6 +454,7 @@
s *Service
subscription *Subscription
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a subscription on a given topic for a given
@@ -464,6 +477,14 @@
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 *SubscriptionsCreateCall) Context(ctx context.Context) *SubscriptionsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.subscription)
@@ -482,6 +503,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -524,6 +548,7 @@
s *Service
subscription string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing subscription. All pending messages in the
@@ -543,6 +568,14 @@
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 *SubscriptionsDeleteCall) Context(ctx context.Context) *SubscriptionsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -557,6 +590,9 @@
"subscription": c.subscription,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -608,6 +644,7 @@
s *Service
subscription string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the configuration details of a subscription.
@@ -625,6 +662,14 @@
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 *SubscriptionsGetCall) Context(ctx context.Context) *SubscriptionsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -639,6 +684,9 @@
"subscription": c.subscription,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -689,6 +737,7 @@
type SubscriptionsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists matching subscriptions.
@@ -726,6 +775,14 @@
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 *SubscriptionsListCall) Context(ctx context.Context) *SubscriptionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -747,6 +804,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -804,6 +864,7 @@
s *Service
modifyackdeadlinerequest *ModifyAckDeadlineRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ModifyAckDeadline: Modifies the Ack deadline for a message received
@@ -822,6 +883,14 @@
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 *SubscriptionsModifyAckDeadlineCall) Context(ctx context.Context) *SubscriptionsModifyAckDeadlineCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsModifyAckDeadlineCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.modifyackdeadlinerequest)
@@ -840,6 +909,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -882,6 +954,7 @@
s *Service
modifypushconfigrequest *ModifyPushConfigRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ModifyPushConfig: Modifies the PushConfig for a specified
@@ -903,6 +976,14 @@
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 *SubscriptionsModifyPushConfigCall) Context(ctx context.Context) *SubscriptionsModifyPushConfigCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsModifyPushConfigCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.modifypushconfigrequest)
@@ -921,6 +1002,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -963,6 +1047,7 @@
s *Service
pullrequest *PullRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Pull: Pulls a single message from the server. If return_immediately
@@ -984,6 +1069,14 @@
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 *SubscriptionsPullCall) Context(ctx context.Context) *SubscriptionsPullCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsPullCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.pullrequest)
@@ -1002,6 +1095,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1044,6 +1140,7 @@
s *Service
pullbatchrequest *PullBatchRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// PullBatch: Pulls messages from the server. Returns an empty list if
@@ -1064,6 +1161,14 @@
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 *SubscriptionsPullBatchCall) Context(ctx context.Context) *SubscriptionsPullBatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsPullBatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.pullbatchrequest)
@@ -1082,6 +1187,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1124,6 +1232,7 @@
s *Service
topic *Topic
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates the given topic with the given name.
@@ -1141,6 +1250,14 @@
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 *TopicsCreateCall) Context(ctx context.Context) *TopicsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TopicsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.topic)
@@ -1159,6 +1276,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1201,6 +1321,7 @@
s *Service
topic string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the topic with the given name. Returns NOT_FOUND if
@@ -1220,6 +1341,14 @@
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 *TopicsDeleteCall) Context(ctx context.Context) *TopicsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TopicsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1234,6 +1363,9 @@
"topic": c.topic,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1285,6 +1417,7 @@
s *Service
topic string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the configuration of a topic. Since the topic only has the
@@ -1305,6 +1438,14 @@
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 *TopicsGetCall) Context(ctx context.Context) *TopicsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TopicsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1319,6 +1460,9 @@
"topic": c.topic,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1369,6 +1513,7 @@
type TopicsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists matching topics.
@@ -1406,6 +1551,14 @@
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 *TopicsListCall) Context(ctx context.Context) *TopicsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TopicsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1427,6 +1580,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1484,6 +1640,7 @@
s *Service
publishrequest *PublishRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Publish: Adds a message to the topic. Returns NOT_FOUND if the topic
@@ -1502,6 +1659,14 @@
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 *TopicsPublishCall) Context(ctx context.Context) *TopicsPublishCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TopicsPublishCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.publishrequest)
@@ -1520,6 +1685,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1562,6 +1730,7 @@
s *Service
publishbatchrequest *PublishBatchRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// PublishBatch: Adds one or more messages to the topic. Returns
@@ -1580,6 +1749,14 @@
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 *TopicsPublishBatchCall) Context(ctx context.Context) *TopicsPublishBatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TopicsPublishBatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.publishbatchrequest)
@@ -1598,6 +1775,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/pubsub/v1beta2/pubsub-gen.go b/pubsub/v1beta2/pubsub-gen.go
index 40a661c..78b8230 100644
--- a/pubsub/v1beta2/pubsub-gen.go
+++ b/pubsub/v1beta2/pubsub-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "pubsub:v1beta2"
const apiName = "pubsub"
@@ -417,6 +417,7 @@
subscription string
acknowledgerequest *AcknowledgeRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Acknowledge: Acknowledges the messages associated with the ack tokens
@@ -440,6 +441,14 @@
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 *ProjectsSubscriptionsAcknowledgeCall) Context(ctx context.Context) *ProjectsSubscriptionsAcknowledgeCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSubscriptionsAcknowledgeCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.acknowledgerequest)
@@ -460,6 +469,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -515,6 +527,7 @@
name string
subscription *Subscription
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a subscription to a given topic for a given
@@ -538,6 +551,14 @@
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 *ProjectsSubscriptionsCreateCall) Context(ctx context.Context) *ProjectsSubscriptionsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSubscriptionsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.subscription)
@@ -558,6 +579,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -612,6 +636,7 @@
s *Service
subscription string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an existing subscription. All pending messages in the
@@ -634,6 +659,14 @@
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 *ProjectsSubscriptionsDeleteCall) Context(ctx context.Context) *ProjectsSubscriptionsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSubscriptionsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -648,6 +681,9 @@
"subscription": c.subscription,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -699,6 +735,7 @@
s *Service
subscription string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the configuration details of a subscription.
@@ -716,6 +753,14 @@
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 *ProjectsSubscriptionsGetCall) Context(ctx context.Context) *ProjectsSubscriptionsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSubscriptionsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -730,6 +775,9 @@
"subscription": c.subscription,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -781,6 +829,7 @@
s *Service
resource string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetIamPolicy: Gets the access control policy for a resource. Is empty
@@ -799,6 +848,14 @@
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 *ProjectsSubscriptionsGetIamPolicyCall) Context(ctx context.Context) *ProjectsSubscriptionsGetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSubscriptionsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -813,6 +870,9 @@
"resource": c.resource,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -864,6 +924,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists matching subscriptions.
@@ -897,6 +958,14 @@
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 *ProjectsSubscriptionsListCall) Context(ctx context.Context) *ProjectsSubscriptionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSubscriptionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -917,6 +986,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -980,6 +1052,7 @@
subscription string
modifyackdeadlinerequest *ModifyAckDeadlineRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ModifyAckDeadline: Modifies the ack deadline for a specific message.
@@ -1001,6 +1074,14 @@
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 *ProjectsSubscriptionsModifyAckDeadlineCall) Context(ctx context.Context) *ProjectsSubscriptionsModifyAckDeadlineCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSubscriptionsModifyAckDeadlineCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.modifyackdeadlinerequest)
@@ -1021,6 +1102,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1076,6 +1160,7 @@
subscription string
modifypushconfigrequest *ModifyPushConfigRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ModifyPushConfig: Modifies the PushConfig for a specified
@@ -1099,6 +1184,14 @@
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 *ProjectsSubscriptionsModifyPushConfigCall) Context(ctx context.Context) *ProjectsSubscriptionsModifyPushConfigCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSubscriptionsModifyPushConfigCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.modifypushconfigrequest)
@@ -1119,6 +1212,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1174,6 +1270,7 @@
subscription string
pullrequest *PullRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Pull: Pulls messages from the server. Returns an empty list if there
@@ -1195,6 +1292,14 @@
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 *ProjectsSubscriptionsPullCall) Context(ctx context.Context) *ProjectsSubscriptionsPullCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSubscriptionsPullCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.pullrequest)
@@ -1215,6 +1320,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1270,6 +1378,7 @@
resource string
setiampolicyrequest *SetIamPolicyRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetIamPolicy: Sets the access control policy on the specified
@@ -1289,6 +1398,14 @@
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 *ProjectsSubscriptionsSetIamPolicyCall) Context(ctx context.Context) *ProjectsSubscriptionsSetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSubscriptionsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
@@ -1309,6 +1426,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1364,6 +1484,7 @@
resource string
testiampermissionsrequest *TestIamPermissionsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// TestIamPermissions: Returns permissions that a caller has on the
@@ -1383,6 +1504,14 @@
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 *ProjectsSubscriptionsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsSubscriptionsTestIamPermissionsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsSubscriptionsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
@@ -1403,6 +1532,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1458,6 +1590,7 @@
name string
topic *Topic
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates the given topic with the given name.
@@ -1476,6 +1609,14 @@
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 *ProjectsTopicsCreateCall) Context(ctx context.Context) *ProjectsTopicsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsTopicsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.topic)
@@ -1496,6 +1637,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1550,6 +1694,7 @@
s *Service
topic string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the topic with the given name. Returns NOT_FOUND if
@@ -1572,6 +1717,14 @@
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 *ProjectsTopicsDeleteCall) Context(ctx context.Context) *ProjectsTopicsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsTopicsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1586,6 +1739,9 @@
"topic": c.topic,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1637,6 +1793,7 @@
s *Service
topic string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the configuration of a topic.
@@ -1654,6 +1811,14 @@
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 *ProjectsTopicsGetCall) Context(ctx context.Context) *ProjectsTopicsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsTopicsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1668,6 +1833,9 @@
"topic": c.topic,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1719,6 +1887,7 @@
s *Service
resource string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetIamPolicy: Gets the access control policy for a resource. Is empty
@@ -1737,6 +1906,14 @@
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 *ProjectsTopicsGetIamPolicyCall) Context(ctx context.Context) *ProjectsTopicsGetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsTopicsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1751,6 +1928,9 @@
"resource": c.resource,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1802,6 +1982,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists matching topics.
@@ -1835,6 +2016,14 @@
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 *ProjectsTopicsListCall) Context(ctx context.Context) *ProjectsTopicsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsTopicsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1855,6 +2044,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1918,6 +2110,7 @@
topic string
publishrequest *PublishRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Publish: Adds one or more messages to the topic. Returns NOT_FOUND if
@@ -1939,6 +2132,14 @@
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 *ProjectsTopicsPublishCall) Context(ctx context.Context) *ProjectsTopicsPublishCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsTopicsPublishCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.publishrequest)
@@ -1959,6 +2160,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2014,6 +2218,7 @@
resource string
setiampolicyrequest *SetIamPolicyRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetIamPolicy: Sets the access control policy on the specified
@@ -2033,6 +2238,14 @@
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 *ProjectsTopicsSetIamPolicyCall) Context(ctx context.Context) *ProjectsTopicsSetIamPolicyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsTopicsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
@@ -2053,6 +2266,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2108,6 +2324,7 @@
resource string
testiampermissionsrequest *TestIamPermissionsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// TestIamPermissions: Returns permissions that a caller has on the
@@ -2127,6 +2344,14 @@
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 *ProjectsTopicsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsTopicsTestIamPermissionsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsTopicsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
@@ -2147,6 +2372,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2201,6 +2429,7 @@
s *Service
topic string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the name of the subscriptions for this topic.
@@ -2234,6 +2463,14 @@
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 *ProjectsTopicsSubscriptionsListCall) Context(ctx context.Context) *ProjectsTopicsSubscriptionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ProjectsTopicsSubscriptionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2254,6 +2491,9 @@
"topic": c.topic,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/qpxexpress/v1/qpxexpress-gen.go b/qpxexpress/v1/qpxexpress-gen.go
index 8c9dadd..e8c4f46 100644
--- a/qpxexpress/v1/qpxexpress-gen.go
+++ b/qpxexpress/v1/qpxexpress-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "qpxExpress:v1"
const apiName = "qpxExpress"
@@ -710,6 +710,7 @@
s *Service
tripssearchrequest *TripsSearchRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Search: Returns a list of flights.
@@ -727,6 +728,14 @@
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 *TripsSearchCall) Context(ctx context.Context) *TripsSearchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TripsSearchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.tripssearchrequest)
@@ -745,6 +754,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/replicapool/v1beta1/replicapool-gen.go b/replicapool/v1beta1/replicapool-gen.go
index 402bd74..fd2d664 100644
--- a/replicapool/v1beta1/replicapool-gen.go
+++ b/replicapool/v1beta1/replicapool-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "replicapool:v1beta1"
const apiName = "replicapool"
@@ -543,6 +543,7 @@
poolName string
poolsdeleterequest *PoolsDeleteRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a replica pool.
@@ -563,6 +564,14 @@
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 *PoolsDeleteCall) Context(ctx context.Context) *PoolsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PoolsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.poolsdeleterequest)
@@ -585,6 +594,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -648,6 +660,7 @@
zone string
poolName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets information about a single replica pool.
@@ -667,6 +680,14 @@
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 *PoolsGetCall) Context(ctx context.Context) *PoolsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PoolsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -683,6 +704,9 @@
"poolName": c.poolName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -753,6 +777,7 @@
zone string
pool *Pool
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a new replica pool.
@@ -772,6 +797,14 @@
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 *PoolsInsertCall) Context(ctx context.Context) *PoolsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PoolsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.pool)
@@ -793,6 +826,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -855,6 +891,7 @@
projectName string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all replica pools.
@@ -889,6 +926,14 @@
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 *PoolsListCall) Context(ctx context.Context) *PoolsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PoolsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -910,6 +955,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -987,6 +1035,7 @@
zone string
poolName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Resize: Resize a pool. This is an asynchronous operation, and
@@ -1017,6 +1066,14 @@
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 *PoolsResizeCall) Context(ctx context.Context) *PoolsResizeCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PoolsResizeCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1036,6 +1093,9 @@
"poolName": c.poolName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1110,6 +1170,7 @@
poolName string
template *Template
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Updatetemplate: Update the template used by the pool.
@@ -1130,6 +1191,14 @@
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 *PoolsUpdatetemplateCall) Context(ctx context.Context) *PoolsUpdatetemplateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PoolsUpdatetemplateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.template)
@@ -1152,6 +1221,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1217,6 +1289,7 @@
replicaName string
replicasdeleterequest *ReplicasDeleteRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a replica from the pool.
@@ -1238,6 +1311,14 @@
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 *ReplicasDeleteCall) Context(ctx context.Context) *ReplicasDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReplicasDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.replicasdeleterequest)
@@ -1261,6 +1342,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1339,6 +1423,7 @@
poolName string
replicaName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets information about a specific replica.
@@ -1359,6 +1444,14 @@
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 *ReplicasGetCall) Context(ctx context.Context) *ReplicasGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReplicasGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1376,6 +1469,9 @@
"replicaName": c.replicaName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1453,6 +1549,7 @@
zone string
poolName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all replicas in a pool.
@@ -1488,6 +1585,14 @@
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 *ReplicasListCall) Context(ctx context.Context) *ReplicasListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReplicasListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1510,6 +1615,9 @@
"poolName": c.poolName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1595,6 +1703,7 @@
poolName string
replicaName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Restart: Restarts a replica in a pool.
@@ -1615,6 +1724,14 @@
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 *ReplicasRestartCall) Context(ctx context.Context) *ReplicasRestartCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReplicasRestartCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1632,6 +1749,9 @@
"replicaName": c.replicaName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/replicapool/v1beta2/replicapool-gen.go b/replicapool/v1beta2/replicapool-gen.go
index d22441a..0efd34b 100644
--- a/replicapool/v1beta2/replicapool-gen.go
+++ b/replicapool/v1beta2/replicapool-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "replicapool:v1beta2"
const apiName = "replicapool"
@@ -426,6 +426,7 @@
instanceGroupManager string
instancegroupmanagersabandoninstancesrequest *InstanceGroupManagersAbandonInstancesRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AbandonInstances: Removes the specified instances from the managed
@@ -448,6 +449,14 @@
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 *InstanceGroupManagersAbandonInstancesCall) Context(ctx context.Context) *InstanceGroupManagersAbandonInstancesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersabandoninstancesrequest)
@@ -470,6 +479,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -542,6 +554,7 @@
zone string
instanceGroupManager string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the instance group manager and all instances
@@ -564,6 +577,14 @@
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 *InstanceGroupManagersDeleteCall) Context(ctx context.Context) *InstanceGroupManagersDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -580,6 +601,9 @@
"instanceGroupManager": c.instanceGroupManager,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -650,6 +674,7 @@
instanceGroupManager string
instancegroupmanagersdeleteinstancesrequest *InstanceGroupManagersDeleteInstancesRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// DeleteInstances: Deletes the specified instances. The instances are
@@ -673,6 +698,14 @@
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 *InstanceGroupManagersDeleteInstancesCall) Context(ctx context.Context) *InstanceGroupManagersDeleteInstancesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersdeleteinstancesrequest)
@@ -695,6 +728,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -767,6 +803,7 @@
zone string
instanceGroupManager string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified Instance Group Manager resource.
@@ -786,6 +823,14 @@
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 *InstanceGroupManagersGetCall) Context(ctx context.Context) *InstanceGroupManagersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -802,6 +847,9 @@
"instanceGroupManager": c.instanceGroupManager,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -874,6 +922,7 @@
size int64
instancegroupmanager *InstanceGroupManager
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates an instance group manager, as well as the instance
@@ -895,6 +944,14 @@
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 *InstanceGroupManagersInsertCall) Context(ctx context.Context) *InstanceGroupManagersInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager)
@@ -917,6 +974,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -989,6 +1049,7 @@
project string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of Instance Group Manager resources
@@ -1031,6 +1092,14 @@
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 *InstanceGroupManagersListCall) Context(ctx context.Context) *InstanceGroupManagersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1055,6 +1124,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1138,6 +1210,7 @@
instanceGroupManager string
instancegroupmanagersrecreateinstancesrequest *InstanceGroupManagersRecreateInstancesRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// RecreateInstances: Recreates the specified instances. The instances
@@ -1160,6 +1233,14 @@
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 *InstanceGroupManagersRecreateInstancesCall) Context(ctx context.Context) *InstanceGroupManagersRecreateInstancesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersrecreateinstancesrequest)
@@ -1182,6 +1263,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1255,6 +1339,7 @@
instanceGroupManager string
size int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Resize: Resizes the managed instance group up or down. If resized up,
@@ -1278,6 +1363,14 @@
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 *InstanceGroupManagersResizeCall) Context(ctx context.Context) *InstanceGroupManagersResizeCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1295,6 +1388,9 @@
"instanceGroupManager": c.instanceGroupManager,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1374,6 +1470,7 @@
instanceGroupManager string
instancegroupmanagerssetinstancetemplaterequest *InstanceGroupManagersSetInstanceTemplateRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetInstanceTemplate: Sets the instance template to use when creating
@@ -1395,6 +1492,14 @@
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 *InstanceGroupManagersSetInstanceTemplateCall) Context(ctx context.Context) *InstanceGroupManagersSetInstanceTemplateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerssetinstancetemplaterequest)
@@ -1417,6 +1522,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1490,6 +1598,7 @@
instanceGroupManager string
instancegroupmanagerssettargetpoolsrequest *InstanceGroupManagersSetTargetPoolsRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetTargetPools: Modifies the target pools to which all new instances
@@ -1512,6 +1621,14 @@
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 *InstanceGroupManagersSetTargetPoolsCall) Context(ctx context.Context) *InstanceGroupManagersSetTargetPoolsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerssettargetpoolsrequest)
@@ -1534,6 +1651,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1606,6 +1726,7 @@
zone string
operation string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves the specified zone-specific operation resource.
@@ -1625,6 +1746,14 @@
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 *ZoneOperationsGetCall) Context(ctx context.Context) *ZoneOperationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1641,6 +1770,9 @@
"operation": c.operation,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1709,6 +1841,7 @@
project string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of operation resources contained within the
@@ -1751,6 +1884,14 @@
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 *ZoneOperationsListCall) Context(ctx context.Context) *ZoneOperationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZoneOperationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1775,6 +1916,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/replicapoolupdater/v1beta1/replicapoolupdater-gen.go b/replicapoolupdater/v1beta1/replicapoolupdater-gen.go
index ef6e10d..88573cf 100644
--- a/replicapoolupdater/v1beta1/replicapoolupdater-gen.go
+++ b/replicapoolupdater/v1beta1/replicapoolupdater-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "replicapoolupdater:v1beta1"
const apiName = "replicapoolupdater"
@@ -447,6 +447,7 @@
zone string
rollingUpdate string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Cancel: Cancels an update. The update must be PAUSED before it can be
@@ -468,6 +469,14 @@
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 *RollingUpdatesCancelCall) Context(ctx context.Context) *RollingUpdatesCancelCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RollingUpdatesCancelCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -484,6 +493,9 @@
"rollingUpdate": c.rollingUpdate,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -551,6 +563,7 @@
zone string
rollingUpdate string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns information about an update.
@@ -571,6 +584,14 @@
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 *RollingUpdatesGetCall) Context(ctx context.Context) *RollingUpdatesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RollingUpdatesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -587,6 +608,9 @@
"rollingUpdate": c.rollingUpdate,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -656,6 +680,7 @@
zone string
rollingupdate *RollingUpdate
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts and starts a new update.
@@ -676,6 +701,14 @@
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 *RollingUpdatesInsertCall) Context(ctx context.Context) *RollingUpdatesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RollingUpdatesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.rollingupdate)
@@ -697,6 +730,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -759,6 +795,7 @@
project string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists recent updates for a given managed instance group, in
@@ -802,6 +839,14 @@
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 *RollingUpdatesListCall) Context(ctx context.Context) *RollingUpdatesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RollingUpdatesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -826,6 +871,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -907,6 +955,7 @@
zone string
rollingUpdate string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ListInstanceUpdates: Lists the current status for each instance
@@ -951,6 +1000,14 @@
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 *RollingUpdatesListInstanceUpdatesCall) Context(ctx context.Context) *RollingUpdatesListInstanceUpdatesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RollingUpdatesListInstanceUpdatesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -976,6 +1033,9 @@
"rollingUpdate": c.rollingUpdate,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1064,6 +1124,7 @@
zone string
rollingUpdate string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Pause: Pauses the update in state from ROLLING_FORWARD or
@@ -1086,6 +1147,14 @@
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 *RollingUpdatesPauseCall) Context(ctx context.Context) *RollingUpdatesPauseCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RollingUpdatesPauseCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1102,6 +1171,9 @@
"rollingUpdate": c.rollingUpdate,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1169,6 +1241,7 @@
zone string
rollingUpdate string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Resume: Continues an update in PAUSED state. Has no effect if invoked
@@ -1190,6 +1263,14 @@
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 *RollingUpdatesResumeCall) Context(ctx context.Context) *RollingUpdatesResumeCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RollingUpdatesResumeCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1206,6 +1287,9 @@
"rollingUpdate": c.rollingUpdate,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1273,6 +1357,7 @@
zone string
rollingUpdate string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Rollback: Rolls back the update in state from ROLLING_FORWARD or
@@ -1295,6 +1380,14 @@
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 *RollingUpdatesRollbackCall) Context(ctx context.Context) *RollingUpdatesRollbackCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RollingUpdatesRollbackCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1311,6 +1404,9 @@
"rollingUpdate": c.rollingUpdate,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1378,6 +1474,7 @@
zone string
operation string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves the specified zone-specific operation resource.
@@ -1397,6 +1494,14 @@
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 *ZoneOperationsGetCall) Context(ctx context.Context) *ZoneOperationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1413,6 +1518,9 @@
"operation": c.operation,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1479,6 +1587,7 @@
project string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of Operation resources contained within the
@@ -1521,6 +1630,14 @@
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 *ZoneOperationsListCall) Context(ctx context.Context) *ZoneOperationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZoneOperationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1545,6 +1662,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/reseller/v1/reseller-gen.go b/reseller/v1/reseller-gen.go
index f5b34a3..470258c 100644
--- a/reseller/v1/reseller-gen.go
+++ b/reseller/v1/reseller-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "reseller:v1"
const apiName = "reseller"
@@ -312,6 +312,7 @@
s *Service
customerId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a customer resource if one exists and is owned by the
@@ -330,6 +331,14 @@
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 *CustomersGetCall) Context(ctx context.Context) *CustomersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CustomersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -344,6 +353,9 @@
"customerId": c.customerId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -394,6 +406,7 @@
s *Service
customer *Customer
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a customer resource if one does not already exist.
@@ -420,6 +433,14 @@
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 *CustomersInsertCall) Context(ctx context.Context) *CustomersInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CustomersInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.customer)
@@ -441,6 +462,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -490,6 +514,7 @@
customerId string
customer *Customer
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Update a customer resource if one it exists and is owned by
@@ -509,6 +534,14 @@
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 *CustomersPatchCall) Context(ctx context.Context) *CustomersPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CustomersPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.customer)
@@ -529,6 +562,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -582,6 +618,7 @@
customerId string
customer *Customer
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Update a customer resource if one it exists and is owned by
@@ -601,6 +638,14 @@
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 *CustomersUpdateCall) Context(ctx context.Context) *CustomersUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CustomersUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.customer)
@@ -621,6 +666,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -674,6 +722,7 @@
customerId string
subscriptionId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Activate: Activates a subscription previously suspended by the
@@ -693,6 +742,14 @@
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 *SubscriptionsActivateCall) Context(ctx context.Context) *SubscriptionsActivateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsActivateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -708,6 +765,9 @@
"subscriptionId": c.subscriptionId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -766,6 +826,7 @@
subscriptionId string
changeplanrequest *ChangePlanRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ChangePlan: Changes the plan of a subscription
@@ -785,6 +846,14 @@
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 *SubscriptionsChangePlanCall) Context(ctx context.Context) *SubscriptionsChangePlanCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsChangePlanCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.changeplanrequest)
@@ -806,6 +875,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -867,6 +939,7 @@
subscriptionId string
renewalsettings *RenewalSettings
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ChangeRenewalSettings: Changes the renewal settings of a subscription
@@ -886,6 +959,14 @@
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 *SubscriptionsChangeRenewalSettingsCall) Context(ctx context.Context) *SubscriptionsChangeRenewalSettingsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsChangeRenewalSettingsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.renewalsettings)
@@ -907,6 +988,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -968,6 +1052,7 @@
subscriptionId string
seats *Seats
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ChangeSeats: Changes the seats configuration of a subscription
@@ -987,6 +1072,14 @@
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 *SubscriptionsChangeSeatsCall) Context(ctx context.Context) *SubscriptionsChangeSeatsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsChangeSeatsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.seats)
@@ -1008,6 +1101,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1069,6 +1165,7 @@
subscriptionId string
deletionType string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Cancels/Downgrades a subscription.
@@ -1088,6 +1185,14 @@
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 *SubscriptionsDeleteCall) Context(ctx context.Context) *SubscriptionsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1104,6 +1209,9 @@
"subscriptionId": c.subscriptionId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1173,6 +1281,7 @@
customerId string
subscriptionId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a subscription of the customer.
@@ -1191,6 +1300,14 @@
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 *SubscriptionsGetCall) Context(ctx context.Context) *SubscriptionsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1206,6 +1323,9 @@
"subscriptionId": c.subscriptionId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1264,6 +1384,7 @@
customerId string
subscription *Subscription
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates/Transfers a subscription for the customer.
@@ -1290,6 +1411,14 @@
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 *SubscriptionsInsertCall) Context(ctx context.Context) *SubscriptionsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.subscription)
@@ -1313,6 +1442,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1369,6 +1501,7 @@
type SubscriptionsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists subscriptions of a reseller, optionally filtered by a
@@ -1424,6 +1557,14 @@
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 *SubscriptionsListCall) Context(ctx context.Context) *SubscriptionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1451,6 +1592,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1521,6 +1665,7 @@
customerId string
subscriptionId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// StartPaidService: Starts paid service of a trial subscription
@@ -1539,6 +1684,14 @@
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 *SubscriptionsStartPaidServiceCall) Context(ctx context.Context) *SubscriptionsStartPaidServiceCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsStartPaidServiceCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1554,6 +1707,9 @@
"subscriptionId": c.subscriptionId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1611,6 +1767,7 @@
customerId string
subscriptionId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Suspend: Suspends an active subscription
@@ -1629,6 +1786,14 @@
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 *SubscriptionsSuspendCall) Context(ctx context.Context) *SubscriptionsSuspendCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsSuspendCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1644,6 +1809,9 @@
"subscriptionId": c.subscriptionId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/reseller/v1sandbox/reseller-gen.go b/reseller/v1sandbox/reseller-gen.go
index 9104cc8..4915643 100644
--- a/reseller/v1sandbox/reseller-gen.go
+++ b/reseller/v1sandbox/reseller-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "reseller:v1sandbox"
const apiName = "reseller"
@@ -312,6 +312,7 @@
s *Service
customerId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a customer resource if one exists and is owned by the
@@ -330,6 +331,14 @@
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 *CustomersGetCall) Context(ctx context.Context) *CustomersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CustomersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -344,6 +353,9 @@
"customerId": c.customerId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -394,6 +406,7 @@
s *Service
customer *Customer
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a customer resource if one does not already exist.
@@ -420,6 +433,14 @@
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 *CustomersInsertCall) Context(ctx context.Context) *CustomersInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CustomersInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.customer)
@@ -441,6 +462,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -490,6 +514,7 @@
customerId string
customer *Customer
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Update a customer resource if one it exists and is owned by
@@ -509,6 +534,14 @@
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 *CustomersPatchCall) Context(ctx context.Context) *CustomersPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CustomersPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.customer)
@@ -529,6 +562,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -582,6 +618,7 @@
customerId string
customer *Customer
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Update a customer resource if one it exists and is owned by
@@ -601,6 +638,14 @@
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 *CustomersUpdateCall) Context(ctx context.Context) *CustomersUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CustomersUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.customer)
@@ -621,6 +666,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -674,6 +722,7 @@
customerId string
subscriptionId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Activate: Activates a subscription previously suspended by the
@@ -693,6 +742,14 @@
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 *SubscriptionsActivateCall) Context(ctx context.Context) *SubscriptionsActivateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsActivateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -708,6 +765,9 @@
"subscriptionId": c.subscriptionId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -766,6 +826,7 @@
subscriptionId string
changeplanrequest *ChangePlanRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ChangePlan: Changes the plan of a subscription
@@ -785,6 +846,14 @@
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 *SubscriptionsChangePlanCall) Context(ctx context.Context) *SubscriptionsChangePlanCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsChangePlanCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.changeplanrequest)
@@ -806,6 +875,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -867,6 +939,7 @@
subscriptionId string
renewalsettings *RenewalSettings
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ChangeRenewalSettings: Changes the renewal settings of a subscription
@@ -886,6 +959,14 @@
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 *SubscriptionsChangeRenewalSettingsCall) Context(ctx context.Context) *SubscriptionsChangeRenewalSettingsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsChangeRenewalSettingsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.renewalsettings)
@@ -907,6 +988,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -968,6 +1052,7 @@
subscriptionId string
seats *Seats
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ChangeSeats: Changes the seats configuration of a subscription
@@ -987,6 +1072,14 @@
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 *SubscriptionsChangeSeatsCall) Context(ctx context.Context) *SubscriptionsChangeSeatsCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsChangeSeatsCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.seats)
@@ -1008,6 +1101,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1069,6 +1165,7 @@
subscriptionId string
deletionType string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Cancels/Downgrades a subscription.
@@ -1088,6 +1185,14 @@
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 *SubscriptionsDeleteCall) Context(ctx context.Context) *SubscriptionsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1104,6 +1209,9 @@
"subscriptionId": c.subscriptionId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1173,6 +1281,7 @@
customerId string
subscriptionId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a subscription of the customer.
@@ -1191,6 +1300,14 @@
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 *SubscriptionsGetCall) Context(ctx context.Context) *SubscriptionsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1206,6 +1323,9 @@
"subscriptionId": c.subscriptionId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1264,6 +1384,7 @@
customerId string
subscription *Subscription
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates/Transfers a subscription for the customer.
@@ -1290,6 +1411,14 @@
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 *SubscriptionsInsertCall) Context(ctx context.Context) *SubscriptionsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.subscription)
@@ -1313,6 +1442,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1369,6 +1501,7 @@
type SubscriptionsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists subscriptions of a reseller, optionally filtered by a
@@ -1424,6 +1557,14 @@
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 *SubscriptionsListCall) Context(ctx context.Context) *SubscriptionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1451,6 +1592,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1521,6 +1665,7 @@
customerId string
subscriptionId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// StartPaidService: Starts paid service of a trial subscription
@@ -1539,6 +1684,14 @@
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 *SubscriptionsStartPaidServiceCall) Context(ctx context.Context) *SubscriptionsStartPaidServiceCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsStartPaidServiceCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1554,6 +1707,9 @@
"subscriptionId": c.subscriptionId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1611,6 +1767,7 @@
customerId string
subscriptionId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Suspend: Suspends an active subscription
@@ -1629,6 +1786,14 @@
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 *SubscriptionsSuspendCall) Context(ctx context.Context) *SubscriptionsSuspendCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsSuspendCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1644,6 +1809,9 @@
"subscriptionId": c.subscriptionId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/resourceviews/v1beta1/resourceviews-gen.go b/resourceviews/v1beta1/resourceviews-gen.go
index 0e5f880..87ddae8 100644
--- a/resourceviews/v1beta1/resourceviews-gen.go
+++ b/resourceviews/v1beta1/resourceviews-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "resourceviews:v1beta1"
const apiName = "resourceviews"
@@ -241,6 +241,7 @@
resourceViewName string
regionviewsaddresourcesrequest *RegionViewsAddResourcesRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Addresources: Add resources to the view.
@@ -261,6 +262,14 @@
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 *RegionViewsAddresourcesCall) Context(ctx context.Context) *RegionViewsAddresourcesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RegionViewsAddresourcesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionviewsaddresourcesrequest)
@@ -283,6 +292,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -346,6 +358,7 @@
region string
resourceViewName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a resource view.
@@ -365,6 +378,14 @@
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 *RegionViewsDeleteCall) Context(ctx context.Context) *RegionViewsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RegionViewsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -381,6 +402,9 @@
"resourceViewName": c.resourceViewName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -441,6 +465,7 @@
region string
resourceViewName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get the information of a resource view.
@@ -460,6 +485,14 @@
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 *RegionViewsGetCall) Context(ctx context.Context) *RegionViewsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RegionViewsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -476,6 +509,9 @@
"resourceViewName": c.resourceViewName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -546,6 +582,7 @@
region string
resourceview *ResourceView
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Create a resource view.
@@ -565,6 +602,14 @@
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 *RegionViewsInsertCall) Context(ctx context.Context) *RegionViewsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RegionViewsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourceview)
@@ -586,6 +631,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -648,6 +696,7 @@
projectName string
region string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List resource views.
@@ -683,6 +732,14 @@
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 *RegionViewsListCall) Context(ctx context.Context) *RegionViewsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RegionViewsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -704,6 +761,9 @@
"region": c.region,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -781,6 +841,7 @@
region string
resourceViewName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Listresources: List the resources in the view.
@@ -817,6 +878,14 @@
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 *RegionViewsListresourcesCall) Context(ctx context.Context) *RegionViewsListresourcesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RegionViewsListresourcesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -839,6 +908,9 @@
"resourceViewName": c.resourceViewName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -924,6 +996,7 @@
resourceViewName string
regionviewsremoveresourcesrequest *RegionViewsRemoveResourcesRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Removeresources: Remove resources from the view.
@@ -944,6 +1017,14 @@
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 *RegionViewsRemoveresourcesCall) Context(ctx context.Context) *RegionViewsRemoveresourcesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *RegionViewsRemoveresourcesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionviewsremoveresourcesrequest)
@@ -966,6 +1047,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1030,6 +1114,7 @@
resourceViewName string
zoneviewsaddresourcesrequest *ZoneViewsAddResourcesRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Addresources: Add resources to the view.
@@ -1050,6 +1135,14 @@
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 *ZoneViewsAddresourcesCall) Context(ctx context.Context) *ZoneViewsAddresourcesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZoneViewsAddresourcesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.zoneviewsaddresourcesrequest)
@@ -1072,6 +1165,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1135,6 +1231,7 @@
zone string
resourceViewName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a resource view.
@@ -1154,6 +1251,14 @@
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 *ZoneViewsDeleteCall) Context(ctx context.Context) *ZoneViewsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZoneViewsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1170,6 +1275,9 @@
"resourceViewName": c.resourceViewName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1230,6 +1338,7 @@
zone string
resourceViewName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get the information of a zonal resource view.
@@ -1249,6 +1358,14 @@
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 *ZoneViewsGetCall) Context(ctx context.Context) *ZoneViewsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZoneViewsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1265,6 +1382,9 @@
"resourceViewName": c.resourceViewName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1335,6 +1455,7 @@
zone string
resourceview *ResourceView
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Create a resource view.
@@ -1354,6 +1475,14 @@
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 *ZoneViewsInsertCall) Context(ctx context.Context) *ZoneViewsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZoneViewsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourceview)
@@ -1375,6 +1504,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1437,6 +1569,7 @@
projectName string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List resource views.
@@ -1472,6 +1605,14 @@
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 *ZoneViewsListCall) Context(ctx context.Context) *ZoneViewsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZoneViewsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1493,6 +1634,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1570,6 +1714,7 @@
zone string
resourceViewName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Listresources: List the resources of the resource view.
@@ -1606,6 +1751,14 @@
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 *ZoneViewsListresourcesCall) Context(ctx context.Context) *ZoneViewsListresourcesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZoneViewsListresourcesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1628,6 +1781,9 @@
"resourceViewName": c.resourceViewName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1713,6 +1869,7 @@
resourceViewName string
zoneviewsremoveresourcesrequest *ZoneViewsRemoveResourcesRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Removeresources: Remove resources from the view.
@@ -1733,6 +1890,14 @@
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 *ZoneViewsRemoveresourcesCall) Context(ctx context.Context) *ZoneViewsRemoveresourcesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZoneViewsRemoveresourcesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.zoneviewsremoveresourcesrequest)
@@ -1755,6 +1920,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/resourceviews/v1beta2/resourceviews-gen.go b/resourceviews/v1beta2/resourceviews-gen.go
index f5e0b43..2e90e62 100644
--- a/resourceviews/v1beta2/resourceviews-gen.go
+++ b/resourceviews/v1beta2/resourceviews-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "resourceviews:v1beta2"
const apiName = "resourceviews"
@@ -408,6 +408,7 @@
zone string
operation string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves the specified zone-specific operation resource.
@@ -427,6 +428,14 @@
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 *ZoneOperationsGetCall) Context(ctx context.Context) *ZoneOperationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -443,6 +452,9 @@
"operation": c.operation,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -515,6 +527,7 @@
project string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of operation resources contained within the
@@ -557,6 +570,14 @@
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 *ZoneOperationsListCall) Context(ctx context.Context) *ZoneOperationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZoneOperationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -581,6 +602,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -666,6 +690,7 @@
resourceView string
zoneviewsaddresourcesrequest *ZoneViewsAddResourcesRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// AddResources: Add resources to the view.
@@ -686,6 +711,14 @@
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 *ZoneViewsAddResourcesCall) Context(ctx context.Context) *ZoneViewsAddResourcesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZoneViewsAddResourcesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.zoneviewsaddresourcesrequest)
@@ -708,6 +741,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -778,6 +814,7 @@
zone string
resourceView string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a resource view.
@@ -797,6 +834,14 @@
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 *ZoneViewsDeleteCall) Context(ctx context.Context) *ZoneViewsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZoneViewsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -813,6 +858,9 @@
"resourceView": c.resourceView,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -880,6 +928,7 @@
zone string
resourceView string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get the information of a zonal resource view.
@@ -899,6 +948,14 @@
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 *ZoneViewsGetCall) Context(ctx context.Context) *ZoneViewsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZoneViewsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -915,6 +972,9 @@
"resourceView": c.resourceView,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -985,6 +1045,7 @@
zone string
resourceView string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetService: Get the service information of a resource view or a
@@ -1013,6 +1074,14 @@
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 *ZoneViewsGetServiceCall) Context(ctx context.Context) *ZoneViewsGetServiceCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZoneViewsGetServiceCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1032,6 +1101,9 @@
"resourceView": c.resourceView,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1104,6 +1176,7 @@
zone string
resourceview *ResourceView
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Create a resource view.
@@ -1123,6 +1196,14 @@
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 *ZoneViewsInsertCall) Context(ctx context.Context) *ZoneViewsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZoneViewsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourceview)
@@ -1144,6 +1225,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1206,6 +1290,7 @@
project string
zone string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List resource views.
@@ -1241,6 +1326,14 @@
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 *ZoneViewsListCall) Context(ctx context.Context) *ZoneViewsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZoneViewsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1262,6 +1355,9 @@
"zone": c.zone,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1339,6 +1435,7 @@
zone string
resourceView string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ListResources: List the resources of the resource view.
@@ -1408,6 +1505,14 @@
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 *ZoneViewsListResourcesCall) Context(ctx context.Context) *ZoneViewsListResourcesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZoneViewsListResourcesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1439,6 +1544,9 @@
"resourceView": c.resourceView,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1558,6 +1666,7 @@
resourceView string
zoneviewsremoveresourcesrequest *ZoneViewsRemoveResourcesRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// RemoveResources: Remove resources from the view.
@@ -1578,6 +1687,14 @@
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 *ZoneViewsRemoveResourcesCall) Context(ctx context.Context) *ZoneViewsRemoveResourcesCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZoneViewsRemoveResourcesCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.zoneviewsremoveresourcesrequest)
@@ -1600,6 +1717,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1671,6 +1791,7 @@
resourceView string
zoneviewssetservicerequest *ZoneViewsSetServiceRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetService: Update the service information of a resource view or a
@@ -1692,6 +1813,14 @@
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 *ZoneViewsSetServiceCall) Context(ctx context.Context) *ZoneViewsSetServiceCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ZoneViewsSetServiceCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.zoneviewssetservicerequest)
@@ -1714,6 +1843,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/siteverification/v1/siteverification-gen.go b/siteverification/v1/siteverification-gen.go
index 9ee9de2..803ba44 100644
--- a/siteverification/v1/siteverification-gen.go
+++ b/siteverification/v1/siteverification-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "siteVerification:v1"
const apiName = "siteVerification"
@@ -157,6 +157,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Relinquish ownership of a website or domain.
@@ -174,6 +175,14 @@
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 *WebResourceDeleteCall) Context(ctx context.Context) *WebResourceDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *WebResourceDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -188,6 +197,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -230,6 +242,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get the most current data for a website or domain.
@@ -247,6 +260,14 @@
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 *WebResourceGetCall) Context(ctx context.Context) *WebResourceGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *WebResourceGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -261,6 +282,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -310,6 +334,7 @@
s *Service
siteverificationwebresourcegettokenrequest *SiteVerificationWebResourceGettokenRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetToken: Get a verification token for placing on a website or
@@ -328,6 +353,14 @@
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 *WebResourceGetTokenCall) Context(ctx context.Context) *WebResourceGetTokenCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *WebResourceGetTokenCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.siteverificationwebresourcegettokenrequest)
@@ -346,6 +379,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -389,6 +425,7 @@
verificationMethod string
siteverificationwebresourceresource *SiteVerificationWebResourceResource
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Attempt verification of a website or domain.
@@ -407,6 +444,14 @@
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 *WebResourceInsertCall) Context(ctx context.Context) *WebResourceInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *WebResourceInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.siteverificationwebresourceresource)
@@ -426,6 +471,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -478,6 +526,7 @@
type WebResourceListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Get the list of your verified websites and domains.
@@ -494,6 +543,14 @@
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 *WebResourceListCall) Context(ctx context.Context) *WebResourceListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *WebResourceListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -506,6 +563,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -545,6 +605,7 @@
id string
siteverificationwebresourceresource *SiteVerificationWebResourceResource
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Modify the list of owners for your website or domain. This
@@ -564,6 +625,14 @@
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 *WebResourcePatchCall) Context(ctx context.Context) *WebResourcePatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *WebResourcePatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.siteverificationwebresourceresource)
@@ -584,6 +653,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -637,6 +709,7 @@
id string
siteverificationwebresourceresource *SiteVerificationWebResourceResource
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Modify the list of owners for your website or domain.
@@ -655,6 +728,14 @@
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 *WebResourceUpdateCall) Context(ctx context.Context) *WebResourceUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *WebResourceUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.siteverificationwebresourceresource)
@@ -675,6 +756,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/spectrum/v1explorer/spectrum-gen.go b/spectrum/v1explorer/spectrum-gen.go
index ad2e2e8..298d10a 100644
--- a/spectrum/v1explorer/spectrum-gen.go
+++ b/spectrum/v1explorer/spectrum-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "spectrum:v1explorer"
const apiName = "spectrum"
@@ -1065,6 +1065,7 @@
s *Service
pawsgetspectrumrequest *PawsGetSpectrumRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetSpectrum: Requests information about the available spectrum for a
@@ -1084,6 +1085,14 @@
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 *PawsGetSpectrumCall) Context(ctx context.Context) *PawsGetSpectrumCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PawsGetSpectrumCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.pawsgetspectrumrequest)
@@ -1102,6 +1111,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1140,6 +1152,7 @@
s *Service
pawsgetspectrumbatchrequest *PawsGetSpectrumBatchRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetSpectrumBatch: The Google Spectrum Database does not support batch
@@ -1158,6 +1171,14 @@
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 *PawsGetSpectrumBatchCall) Context(ctx context.Context) *PawsGetSpectrumBatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PawsGetSpectrumBatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.pawsgetspectrumbatchrequest)
@@ -1176,6 +1197,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1214,6 +1238,7 @@
s *Service
pawsinitrequest *PawsInitRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Init: Initializes the connection between a white space device and the
@@ -1232,6 +1257,14 @@
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 *PawsInitCall) Context(ctx context.Context) *PawsInitCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PawsInitCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.pawsinitrequest)
@@ -1250,6 +1283,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1288,6 +1324,7 @@
s *Service
pawsnotifyspectrumuserequest *PawsNotifySpectrumUseRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// NotifySpectrumUse: Notifies the database that the device has selected
@@ -1309,6 +1346,14 @@
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 *PawsNotifySpectrumUseCall) Context(ctx context.Context) *PawsNotifySpectrumUseCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PawsNotifySpectrumUseCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.pawsnotifyspectrumuserequest)
@@ -1327,6 +1372,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1365,6 +1413,7 @@
s *Service
pawsregisterrequest *PawsRegisterRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Register: The Google Spectrum Database implements registration in the
@@ -1384,6 +1433,14 @@
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 *PawsRegisterCall) Context(ctx context.Context) *PawsRegisterCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PawsRegisterCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.pawsregisterrequest)
@@ -1402,6 +1459,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1440,6 +1500,7 @@
s *Service
pawsverifydevicerequest *PawsVerifyDeviceRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// VerifyDevice: Validates a device for white space use in accordance
@@ -1460,6 +1521,14 @@
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 *PawsVerifyDeviceCall) Context(ctx context.Context) *PawsVerifyDeviceCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PawsVerifyDeviceCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.pawsverifydevicerequest)
@@ -1478,6 +1547,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/sqladmin/v1beta3/sqladmin-gen.go b/sqladmin/v1beta3/sqladmin-gen.go
index 2164fad..144eebc 100644
--- a/sqladmin/v1beta3/sqladmin-gen.go
+++ b/sqladmin/v1beta3/sqladmin-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "sqladmin:v1beta3"
const apiName = "sqladmin"
@@ -883,6 +883,7 @@
backupConfiguration string
dueTime string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves information about a specified backup run for a Cloud
@@ -904,6 +905,14 @@
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 *BackupRunsGetCall) Context(ctx context.Context) *BackupRunsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BackupRunsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -921,6 +930,9 @@
"backupConfiguration": c.backupConfiguration,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -994,6 +1006,7 @@
instance string
backupConfiguration string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all backup runs associated with a Cloud SQL instance.
@@ -1028,6 +1041,14 @@
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 *BackupRunsListCall) Context(ctx context.Context) *BackupRunsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BackupRunsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1050,6 +1071,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1124,6 +1148,7 @@
type FlagsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all database flags that can be set for Google Cloud SQL
@@ -1141,6 +1166,14 @@
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 *FlagsListCall) Context(ctx context.Context) *FlagsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FlagsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1153,6 +1186,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1193,6 +1229,7 @@
project string
instancesclonerequest *InstancesCloneRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Clone: Creates a Cloud SQL instance as a clone of a source instance.
@@ -1211,6 +1248,14 @@
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 *InstancesCloneCall) Context(ctx context.Context) *InstancesCloneCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesCloneCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesclonerequest)
@@ -1231,6 +1276,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1285,6 +1333,7 @@
project string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a Cloud SQL instance.
@@ -1303,6 +1352,14 @@
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 *InstancesDeleteCall) Context(ctx context.Context) *InstancesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1318,6 +1375,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1377,6 +1437,7 @@
instance string
instancesexportrequest *InstancesExportRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Export: Exports data from a Cloud SQL instance to a Google Cloud
@@ -1397,6 +1458,14 @@
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 *InstancesExportCall) Context(ctx context.Context) *InstancesExportCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesExportCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesexportrequest)
@@ -1418,6 +1487,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1478,6 +1550,7 @@
project string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves information about a Cloud SQL instance.
@@ -1496,6 +1569,14 @@
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 *InstancesGetCall) Context(ctx context.Context) *InstancesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1511,6 +1592,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1570,6 +1654,7 @@
instance string
instancesimportrequest *InstancesImportRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Import: Imports data into a Cloud SQL instance from a MySQL dump file
@@ -1590,6 +1675,14 @@
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 *InstancesImportCall) Context(ctx context.Context) *InstancesImportCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesImportCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesimportrequest)
@@ -1611,6 +1704,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1671,6 +1767,7 @@
project string
databaseinstance *DatabaseInstance
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a new Cloud SQL instance.
@@ -1689,6 +1786,14 @@
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 *InstancesInsertCall) Context(ctx context.Context) *InstancesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.databaseinstance)
@@ -1709,6 +1814,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1762,6 +1870,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists instances for a given project, in alphabetical order by
@@ -1795,6 +1904,14 @@
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 *InstancesListCall) Context(ctx context.Context) *InstancesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1815,6 +1932,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1878,6 +1998,7 @@
instance string
databaseinstance *DatabaseInstance
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates the settings of a Cloud SQL instance. This method
@@ -1898,6 +2019,14 @@
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 *InstancesPatchCall) Context(ctx context.Context) *InstancesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.databaseinstance)
@@ -1919,6 +2048,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1980,6 +2112,7 @@
project string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// PromoteReplica: Promotes the read replica instance to be a
@@ -1999,6 +2132,14 @@
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 *InstancesPromoteReplicaCall) Context(ctx context.Context) *InstancesPromoteReplicaCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesPromoteReplicaCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2014,6 +2155,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2072,6 +2216,7 @@
project string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ResetSslConfig: Deletes all client certificates and generates a new
@@ -2091,6 +2236,14 @@
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 *InstancesResetSslConfigCall) Context(ctx context.Context) *InstancesResetSslConfigCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesResetSslConfigCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2106,6 +2259,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2164,6 +2320,7 @@
project string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Restart: Restarts a Cloud SQL instance.
@@ -2182,6 +2339,14 @@
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 *InstancesRestartCall) Context(ctx context.Context) *InstancesRestartCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesRestartCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2197,6 +2362,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2257,6 +2425,7 @@
backupConfigurationid string
dueTime string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// RestoreBackup: Restores a backup of a Cloud SQL instance.
@@ -2277,6 +2446,14 @@
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 *InstancesRestoreBackupCall) Context(ctx context.Context) *InstancesRestoreBackupCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesRestoreBackupCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2294,6 +2471,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2367,6 +2547,7 @@
instance string
instancesetrootpasswordrequest *InstanceSetRootPasswordRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetRootPassword: Sets the password for the root user of the specified
@@ -2387,6 +2568,14 @@
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 *InstancesSetRootPasswordCall) Context(ctx context.Context) *InstancesSetRootPasswordCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesSetRootPasswordCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesetrootpasswordrequest)
@@ -2408,6 +2597,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2470,6 +2662,7 @@
instance string
databaseinstance *DatabaseInstance
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates the settings of a Cloud SQL instance.
@@ -2489,6 +2682,14 @@
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 *InstancesUpdateCall) Context(ctx context.Context) *InstancesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.databaseinstance)
@@ -2510,6 +2711,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2573,6 +2777,7 @@
instance string
operation string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves information about a specific operation that was
@@ -2593,6 +2798,14 @@
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 *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2609,6 +2822,9 @@
"operation": c.operation,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2674,6 +2890,7 @@
project string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all operations that have been performed on a Cloud SQL
@@ -2708,6 +2925,14 @@
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 *OperationsListCall) Context(ctx context.Context) *OperationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2729,6 +2954,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2799,6 +3027,7 @@
instance string
sha1Fingerprint string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an SSL certificate from a Cloud SQL instance.
@@ -2818,6 +3047,14 @@
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 *SslCertsDeleteCall) Context(ctx context.Context) *SslCertsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SslCertsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2834,6 +3071,9 @@
"sha1Fingerprint": c.sha1Fingerprint,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2900,6 +3140,7 @@
instance string
sha1Fingerprint string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves an SSL certificate as specified by its SHA-1
@@ -2920,6 +3161,14 @@
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 *SslCertsGetCall) Context(ctx context.Context) *SslCertsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SslCertsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2936,6 +3185,9 @@
"sha1Fingerprint": c.sha1Fingerprint,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3002,6 +3254,7 @@
instance string
sslcertsinsertrequest *SslCertsInsertRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates an SSL certificate and returns the certificate, the
@@ -3022,6 +3275,14 @@
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 *SslCertsInsertCall) Context(ctx context.Context) *SslCertsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SslCertsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.sslcertsinsertrequest)
@@ -3043,6 +3304,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3104,6 +3368,7 @@
project string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all of the current SSL certificates defined for a Cloud
@@ -3123,6 +3388,14 @@
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 *SslCertsListCall) Context(ctx context.Context) *SslCertsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SslCertsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3138,6 +3411,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3195,6 +3471,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists service tiers that can be used to create Google Cloud SQL
@@ -3213,6 +3490,14 @@
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 *TiersListCall) Context(ctx context.Context) *TiersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TiersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3227,6 +3512,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/sqladmin/v1beta4/sqladmin-gen.go b/sqladmin/v1beta4/sqladmin-gen.go
index 07093e1..f0a727c 100644
--- a/sqladmin/v1beta4/sqladmin-gen.go
+++ b/sqladmin/v1beta4/sqladmin-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "sqladmin:v1beta4"
const apiName = "sqladmin"
@@ -1045,6 +1045,7 @@
instance string
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the backup taken by a backup run.
@@ -1064,6 +1065,14 @@
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 *BackupRunsDeleteCall) Context(ctx context.Context) *BackupRunsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BackupRunsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1080,6 +1089,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1147,6 +1159,7 @@
instance string
id int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a resource containing information about a backup run.
@@ -1166,6 +1179,14 @@
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 *BackupRunsGetCall) Context(ctx context.Context) *BackupRunsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BackupRunsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1182,6 +1203,9 @@
"id": strconv.FormatInt(c.id, 10),
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1248,6 +1272,7 @@
project string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all backup runs associated with a given instance and
@@ -1283,6 +1308,14 @@
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 *BackupRunsListCall) Context(ctx context.Context) *BackupRunsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BackupRunsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1304,6 +1337,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1374,6 +1410,7 @@
instance string
database string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a resource containing information about a database
@@ -1394,6 +1431,14 @@
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 *DatabasesDeleteCall) Context(ctx context.Context) *DatabasesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatabasesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1410,6 +1455,9 @@
"database": c.database,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1476,6 +1524,7 @@
instance string
database string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a resource containing information about a database
@@ -1496,6 +1545,14 @@
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 *DatabasesGetCall) Context(ctx context.Context) *DatabasesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatabasesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1512,6 +1569,9 @@
"database": c.database,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1578,6 +1638,7 @@
instance string
database *Database
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Inserts a resource containing information about a database
@@ -1598,6 +1659,14 @@
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 *DatabasesInsertCall) Context(ctx context.Context) *DatabasesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatabasesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.database)
@@ -1619,6 +1688,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1680,6 +1752,7 @@
project string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists databases in the specified Cloud SQL instance.
@@ -1698,6 +1771,14 @@
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 *DatabasesListCall) Context(ctx context.Context) *DatabasesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatabasesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1713,6 +1794,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1773,6 +1857,7 @@
database string
database2 *Database
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a resource containing information about a database
@@ -1794,6 +1879,14 @@
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 *DatabasesPatchCall) Context(ctx context.Context) *DatabasesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatabasesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.database2)
@@ -1816,6 +1909,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1886,6 +1982,7 @@
database string
database2 *Database
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a resource containing information about a database
@@ -1907,6 +2004,14 @@
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 *DatabasesUpdateCall) Context(ctx context.Context) *DatabasesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DatabasesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.database2)
@@ -1929,6 +2034,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1995,6 +2103,7 @@
type FlagsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all available database flags for Google Cloud SQL
@@ -2012,6 +2121,14 @@
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 *FlagsListCall) Context(ctx context.Context) *FlagsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *FlagsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2024,6 +2141,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2065,6 +2185,7 @@
instance string
instancesclonerequest *InstancesCloneRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Clone: Creates a Cloud SQL instance as a clone of the source
@@ -2085,6 +2206,14 @@
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 *InstancesCloneCall) Context(ctx context.Context) *InstancesCloneCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesCloneCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesclonerequest)
@@ -2106,6 +2235,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2167,6 +2299,7 @@
project string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a Cloud SQL instance.
@@ -2185,6 +2318,14 @@
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 *InstancesDeleteCall) Context(ctx context.Context) *InstancesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2200,6 +2341,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2259,6 +2403,7 @@
instance string
instancesexportrequest *InstancesExportRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Export: Exports data from a Cloud SQL instance to a Google Cloud
@@ -2279,6 +2424,14 @@
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 *InstancesExportCall) Context(ctx context.Context) *InstancesExportCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesExportCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesexportrequest)
@@ -2300,6 +2453,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2360,6 +2516,7 @@
project string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a resource containing information about a Cloud SQL
@@ -2379,6 +2536,14 @@
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 *InstancesGetCall) Context(ctx context.Context) *InstancesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2394,6 +2559,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2453,6 +2621,7 @@
instance string
instancesimportrequest *InstancesImportRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Import: Imports data into a Cloud SQL instance from a MySQL dump file
@@ -2473,6 +2642,14 @@
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 *InstancesImportCall) Context(ctx context.Context) *InstancesImportCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesImportCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesimportrequest)
@@ -2494,6 +2671,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2554,6 +2734,7 @@
project string
databaseinstance *DatabaseInstance
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a new Cloud SQL instance.
@@ -2572,6 +2753,14 @@
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 *InstancesInsertCall) Context(ctx context.Context) *InstancesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.databaseinstance)
@@ -2592,6 +2781,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2645,6 +2837,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists instances under a given project in the alphabetical order
@@ -2678,6 +2871,14 @@
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 *InstancesListCall) Context(ctx context.Context) *InstancesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2698,6 +2899,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2761,6 +2965,7 @@
instance string
databaseinstance *DatabaseInstance
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates settings of a Cloud SQL instance. Caution: This is not
@@ -2783,6 +2988,14 @@
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 *InstancesPatchCall) Context(ctx context.Context) *InstancesPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.databaseinstance)
@@ -2804,6 +3017,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2865,6 +3081,7 @@
project string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// PromoteReplica: Promotes the read replica instance to be a
@@ -2884,6 +3101,14 @@
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 *InstancesPromoteReplicaCall) Context(ctx context.Context) *InstancesPromoteReplicaCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesPromoteReplicaCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2899,6 +3124,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2957,6 +3185,7 @@
project string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ResetSslConfig: Deletes all client certificates and generates a new
@@ -2979,6 +3208,14 @@
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 *InstancesResetSslConfigCall) Context(ctx context.Context) *InstancesResetSslConfigCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesResetSslConfigCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2994,6 +3231,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3052,6 +3292,7 @@
project string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Restart: Restarts a Cloud SQL instance.
@@ -3070,6 +3311,14 @@
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 *InstancesRestartCall) Context(ctx context.Context) *InstancesRestartCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesRestartCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3085,6 +3334,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3144,6 +3396,7 @@
instance string
instancesrestorebackuprequest *InstancesRestoreBackupRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// RestoreBackup: Restores a backup of a Cloud SQL instance.
@@ -3163,6 +3416,14 @@
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 *InstancesRestoreBackupCall) Context(ctx context.Context) *InstancesRestoreBackupCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesRestoreBackupCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesrestorebackuprequest)
@@ -3184,6 +3445,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3245,6 +3509,7 @@
project string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// StartReplica: Starts the replication in the read replica instance.
@@ -3263,6 +3528,14 @@
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 *InstancesStartReplicaCall) Context(ctx context.Context) *InstancesStartReplicaCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesStartReplicaCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3278,6 +3551,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3336,6 +3612,7 @@
project string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// StopReplica: Stops the replication in the read replica instance.
@@ -3354,6 +3631,14 @@
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 *InstancesStopReplicaCall) Context(ctx context.Context) *InstancesStopReplicaCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesStopReplicaCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3369,6 +3654,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3428,6 +3716,7 @@
instance string
databaseinstance *DatabaseInstance
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates settings of a Cloud SQL instance. Caution: This is
@@ -3449,6 +3738,14 @@
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 *InstancesUpdateCall) Context(ctx context.Context) *InstancesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *InstancesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.databaseinstance)
@@ -3470,6 +3767,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3532,6 +3832,7 @@
project string
operation string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves an instance operation that has been performed on an
@@ -3551,6 +3852,14 @@
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 *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3566,6 +3875,9 @@
"operation": c.operation,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3624,6 +3936,7 @@
project string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all instance operations that have been performed on the
@@ -3659,6 +3972,14 @@
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 *OperationsListCall) Context(ctx context.Context) *OperationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3680,6 +4001,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3750,6 +4074,7 @@
instance string
sslcertscreateephemeralrequest *SslCertsCreateEphemeralRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// CreateEphemeral: Generates a short-lived X509 certificate containing
@@ -3772,6 +4097,14 @@
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 *SslCertsCreateEphemeralCall) Context(ctx context.Context) *SslCertsCreateEphemeralCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SslCertsCreateEphemeralCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.sslcertscreateephemeralrequest)
@@ -3793,6 +4126,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3855,6 +4191,7 @@
instance string
sha1Fingerprint string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the SSL certificate. The change will not take effect
@@ -3875,6 +4212,14 @@
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 *SslCertsDeleteCall) Context(ctx context.Context) *SslCertsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SslCertsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3891,6 +4236,9 @@
"sha1Fingerprint": c.sha1Fingerprint,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3957,6 +4305,7 @@
instance string
sha1Fingerprint string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves a particular SSL certificate. Does not include the
@@ -3978,6 +4327,14 @@
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 *SslCertsGetCall) Context(ctx context.Context) *SslCertsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SslCertsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3994,6 +4351,9 @@
"sha1Fingerprint": c.sha1Fingerprint,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4060,6 +4420,7 @@
instance string
sslcertsinsertrequest *SslCertsInsertRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates an SSL certificate and returns it along with the
@@ -4081,6 +4442,14 @@
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 *SslCertsInsertCall) Context(ctx context.Context) *SslCertsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SslCertsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.sslcertsinsertrequest)
@@ -4102,6 +4471,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4163,6 +4535,7 @@
project string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all of the current SSL certificates for the instance.
@@ -4181,6 +4554,14 @@
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 *SslCertsListCall) Context(ctx context.Context) *SslCertsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SslCertsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4196,6 +4577,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4253,6 +4637,7 @@
s *Service
project string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all available service tiers for Google Cloud SQL, for
@@ -4271,6 +4656,14 @@
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 *TiersListCall) Context(ctx context.Context) *TiersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TiersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4285,6 +4678,9 @@
"project": c.project,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4338,6 +4734,7 @@
host string
name string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a user from a Cloud SQL instance.
@@ -4358,6 +4755,14 @@
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 *UsersDeleteCall) Context(ctx context.Context) *UsersDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4375,6 +4780,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4448,6 +4856,7 @@
instance string
user *User
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a new user in a Cloud SQL instance.
@@ -4467,6 +4876,14 @@
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 *UsersInsertCall) Context(ctx context.Context) *UsersInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
@@ -4488,6 +4905,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4549,6 +4969,7 @@
project string
instance string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists users in the specified Cloud SQL instance.
@@ -4567,6 +4988,14 @@
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 *UsersListCall) Context(ctx context.Context) *UsersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4582,6 +5011,9 @@
"instance": c.instance,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4643,6 +5075,7 @@
name string
user *User
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an existing user in a Cloud SQL instance.
@@ -4664,6 +5097,14 @@
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 *UsersUpdateCall) Context(ctx context.Context) *UsersUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UsersUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
@@ -4687,6 +5128,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/storage/v1/storage-gen.go b/storage/v1/storage-gen.go
index 363866a..d22c9b8 100644
--- a/storage/v1/storage-gen.go
+++ b/storage/v1/storage-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "storage:v1"
const apiName = "storage"
@@ -725,6 +725,7 @@
bucket string
entity string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Permanently deletes the ACL entry for the specified entity on
@@ -744,6 +745,14 @@
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 *BucketAccessControlsDeleteCall) Context(ctx context.Context) *BucketAccessControlsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -759,6 +768,9 @@
"entity": c.entity,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -809,6 +821,7 @@
bucket string
entity string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the ACL entry for the specified entity on the specified
@@ -828,6 +841,14 @@
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 *BucketAccessControlsGetCall) Context(ctx context.Context) *BucketAccessControlsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketAccessControlsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -843,6 +864,9 @@
"entity": c.entity,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -900,6 +924,7 @@
bucket string
bucketaccesscontrol *BucketAccessControl
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a new ACL entry on the specified bucket.
@@ -918,6 +943,14 @@
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 *BucketAccessControlsInsertCall) Context(ctx context.Context) *BucketAccessControlsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucketaccesscontrol)
@@ -938,6 +971,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -990,6 +1026,7 @@
s *Service
bucket string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves ACL entries on the specified bucket.
@@ -1007,6 +1044,14 @@
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 *BucketAccessControlsListCall) Context(ctx context.Context) *BucketAccessControlsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketAccessControlsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1021,6 +1066,9 @@
"bucket": c.bucket,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1072,6 +1120,7 @@
entity string
bucketaccesscontrol *BucketAccessControl
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an ACL entry on the specified bucket. This method
@@ -1092,6 +1141,14 @@
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 *BucketAccessControlsPatchCall) Context(ctx context.Context) *BucketAccessControlsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucketaccesscontrol)
@@ -1113,6 +1170,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1174,6 +1234,7 @@
entity string
bucketaccesscontrol *BucketAccessControl
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an ACL entry on the specified bucket.
@@ -1193,6 +1254,14 @@
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 *BucketAccessControlsUpdateCall) Context(ctx context.Context) *BucketAccessControlsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucketaccesscontrol)
@@ -1214,6 +1283,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1273,6 +1345,7 @@
s *Service
bucket string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Permanently deletes an empty bucket.
@@ -1306,6 +1379,14 @@
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 *BucketsDeleteCall) Context(ctx context.Context) *BucketsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1326,6 +1407,9 @@
"bucket": c.bucket,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1382,6 +1466,7 @@
s *Service
bucket string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns metadata for the specified bucket.
@@ -1428,6 +1513,14 @@
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 *BucketsGetCall) Context(ctx context.Context) *BucketsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1451,6 +1544,9 @@
"bucket": c.bucket,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1530,6 +1626,7 @@
projectid string
bucket *Bucket
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a new bucket.
@@ -1600,6 +1697,14 @@
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 *BucketsInsertCall) Context(ctx context.Context) *BucketsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucket)
@@ -1628,6 +1733,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1735,6 +1843,7 @@
s *Service
projectid string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of buckets for a given project.
@@ -1785,6 +1894,14 @@
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 *BucketsListCall) Context(ctx context.Context) *BucketsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1810,6 +1927,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1894,6 +2014,7 @@
bucket string
bucket2 *Bucket
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a bucket. This method supports patch semantics.
@@ -1980,6 +2101,14 @@
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 *BucketsPatchCall) Context(ctx context.Context) *BucketsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucket2)
@@ -2015,6 +2144,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2135,6 +2267,7 @@
bucket string
bucket2 *Bucket
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a bucket.
@@ -2221,6 +2354,14 @@
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 *BucketsUpdateCall) Context(ctx context.Context) *BucketsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucket2)
@@ -2256,6 +2397,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2375,6 +2519,7 @@
s *Service
channel *Channel
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Stop: Stop watching resources through this channel
@@ -2392,6 +2537,14 @@
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 *ChannelsStopCall) Context(ctx context.Context) *ChannelsStopCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChannelsStopCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
@@ -2410,6 +2563,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2450,6 +2606,7 @@
bucket string
entity string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Permanently deletes the default object ACL entry for the
@@ -2469,6 +2626,14 @@
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 *DefaultObjectAccessControlsDeleteCall) Context(ctx context.Context) *DefaultObjectAccessControlsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DefaultObjectAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2484,6 +2649,9 @@
"entity": c.entity,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2534,6 +2702,7 @@
bucket string
entity string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the default object ACL entry for the specified entity on
@@ -2553,6 +2722,14 @@
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 *DefaultObjectAccessControlsGetCall) Context(ctx context.Context) *DefaultObjectAccessControlsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DefaultObjectAccessControlsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2568,6 +2745,9 @@
"entity": c.entity,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2625,6 +2805,7 @@
bucket string
objectaccesscontrol *ObjectAccessControl
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a new default object ACL entry on the specified
@@ -2644,6 +2825,14 @@
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 *DefaultObjectAccessControlsInsertCall) Context(ctx context.Context) *DefaultObjectAccessControlsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DefaultObjectAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol)
@@ -2664,6 +2853,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2716,6 +2908,7 @@
s *Service
bucket string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves default object ACL entries on the specified bucket.
@@ -2750,6 +2943,14 @@
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 *DefaultObjectAccessControlsListCall) Context(ctx context.Context) *DefaultObjectAccessControlsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DefaultObjectAccessControlsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2770,6 +2971,9 @@
"bucket": c.bucket,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2833,6 +3037,7 @@
entity string
objectaccesscontrol *ObjectAccessControl
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a default object ACL entry on the specified bucket.
@@ -2853,6 +3058,14 @@
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 *DefaultObjectAccessControlsPatchCall) Context(ctx context.Context) *DefaultObjectAccessControlsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DefaultObjectAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol)
@@ -2874,6 +3087,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2935,6 +3151,7 @@
entity string
objectaccesscontrol *ObjectAccessControl
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a default object ACL entry on the specified bucket.
@@ -2954,6 +3171,14 @@
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 *DefaultObjectAccessControlsUpdateCall) Context(ctx context.Context) *DefaultObjectAccessControlsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DefaultObjectAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol)
@@ -2975,6 +3200,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3036,6 +3264,7 @@
object string
entity string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Permanently deletes the ACL entry for the specified entity on
@@ -3064,6 +3293,14 @@
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 *ObjectAccessControlsDeleteCall) Context(ctx context.Context) *ObjectAccessControlsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3083,6 +3320,9 @@
"entity": c.entity,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3147,6 +3387,7 @@
object string
entity string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the ACL entry for the specified entity on the specified
@@ -3175,6 +3416,14 @@
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 *ObjectAccessControlsGetCall) Context(ctx context.Context) *ObjectAccessControlsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectAccessControlsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3194,6 +3443,9 @@
"entity": c.entity,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3265,6 +3517,7 @@
object string
objectaccesscontrol *ObjectAccessControl
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a new ACL entry on the specified object.
@@ -3292,6 +3545,14 @@
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 *ObjectAccessControlsInsertCall) Context(ctx context.Context) *ObjectAccessControlsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol)
@@ -3316,6 +3577,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3382,6 +3646,7 @@
bucket string
object string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves ACL entries on the specified object.
@@ -3408,6 +3673,14 @@
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 *ObjectAccessControlsListCall) Context(ctx context.Context) *ObjectAccessControlsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectAccessControlsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3426,6 +3699,9 @@
"object": c.object,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3491,6 +3767,7 @@
entity string
objectaccesscontrol *ObjectAccessControl
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an ACL entry on the specified object. This method
@@ -3520,6 +3797,14 @@
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 *ObjectAccessControlsPatchCall) Context(ctx context.Context) *ObjectAccessControlsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol)
@@ -3545,6 +3830,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3620,6 +3908,7 @@
entity string
objectaccesscontrol *ObjectAccessControl
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an ACL entry on the specified object.
@@ -3648,6 +3937,14 @@
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 *ObjectAccessControlsUpdateCall) Context(ctx context.Context) *ObjectAccessControlsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol)
@@ -3673,6 +3970,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3747,6 +4047,7 @@
destinationObject string
composerequest *ComposeRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Compose: Concatenates a list of existing objects into a new object in
@@ -3804,6 +4105,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *ObjectsComposeCall) Context(ctx context.Context) *ObjectsComposeCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectsComposeCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.composerequest)
@@ -3834,6 +4143,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3948,6 +4260,7 @@
destinationObject string
object *Object
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Copy: Copies a source object to a destination object. Optionally
@@ -4081,6 +4394,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *ObjectsCopyCall) Context(ctx context.Context) *ObjectsCopyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectsCopyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.object)
@@ -4137,6 +4458,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4317,6 +4641,7 @@
bucket string
object string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an object and its metadata. Deletions are permanent
@@ -4378,6 +4703,14 @@
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 *ObjectsDeleteCall) Context(ctx context.Context) *ObjectsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4408,6 +4741,9 @@
"object": c.object,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4490,6 +4826,7 @@
bucket string
object string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves an object or its metadata.
@@ -4560,6 +4897,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *ObjectsGetCall) Context(ctx context.Context) *ObjectsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4593,6 +4938,9 @@
"object": c.object,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4716,8 +5064,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Insert: Stores a new object and metadata.
@@ -4821,10 +5169,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *ObjectsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ObjectsInsertCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -4849,6 +5199,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *ObjectsInsertCall) Context(ctx context.Context) *ObjectsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.object)
@@ -4912,6 +5272,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5074,6 +5437,7 @@
s *Service
bucket string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of objects matching the criteria.
@@ -5145,6 +5509,14 @@
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 *ObjectsListCall) Context(ctx context.Context) *ObjectsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5177,6 +5549,9 @@
"bucket": c.bucket,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5273,6 +5648,7 @@
object string
object2 *Object
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an object's metadata. This method supports patch
@@ -5365,6 +5741,14 @@
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 *ObjectsPatchCall) Context(ctx context.Context) *ObjectsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.object2)
@@ -5407,6 +5791,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5536,6 +5923,7 @@
destinationObject string
object *Object
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Rewrite: Rewrites a source object to a destination object. Optionally
@@ -5694,6 +6082,14 @@
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 *ObjectsRewriteCall) Context(ctx context.Context) *ObjectsRewriteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectsRewriteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.object)
@@ -5756,6 +6152,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5932,6 +6331,7 @@
object string
object2 *Object
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an object's metadata.
@@ -6023,6 +6423,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *ObjectsUpdateCall) Context(ctx context.Context) *ObjectsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.object2)
@@ -6065,6 +6473,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6207,6 +6618,7 @@
bucket string
channel *Channel
opt_ map[string]interface{}
+ ctx_ context.Context
}
// WatchAll: Watch for changes on all objects in a bucket.
@@ -6279,6 +6691,14 @@
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 *ObjectsWatchAllCall) Context(ctx context.Context) *ObjectsWatchAllCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectsWatchAllCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
@@ -6317,6 +6737,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/storage/v1beta1/storage-gen.go b/storage/v1beta1/storage-gen.go
index f2fafd3..c8c3ec8 100644
--- a/storage/v1beta1/storage-gen.go
+++ b/storage/v1beta1/storage-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "storage:v1beta1"
const apiName = "storage"
@@ -420,6 +420,7 @@
bucket string
entity string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the ACL entry for the specified entity on the
@@ -439,6 +440,14 @@
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 *BucketAccessControlsDeleteCall) Context(ctx context.Context) *BucketAccessControlsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -454,6 +463,9 @@
"entity": c.entity,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -504,6 +516,7 @@
bucket string
entity string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the ACL entry for the specified entity on the specified
@@ -523,6 +536,14 @@
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 *BucketAccessControlsGetCall) Context(ctx context.Context) *BucketAccessControlsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketAccessControlsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -538,6 +559,9 @@
"entity": c.entity,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -595,6 +619,7 @@
bucket string
bucketaccesscontrol *BucketAccessControl
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a new ACL entry on the specified bucket.
@@ -613,6 +638,14 @@
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 *BucketAccessControlsInsertCall) Context(ctx context.Context) *BucketAccessControlsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucketaccesscontrol)
@@ -633,6 +666,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -685,6 +721,7 @@
s *Service
bucket string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves ACL entries on the specified bucket.
@@ -702,6 +739,14 @@
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 *BucketAccessControlsListCall) Context(ctx context.Context) *BucketAccessControlsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketAccessControlsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -716,6 +761,9 @@
"bucket": c.bucket,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -767,6 +815,7 @@
entity string
bucketaccesscontrol *BucketAccessControl
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an ACL entry on the specified bucket. This method
@@ -787,6 +836,14 @@
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 *BucketAccessControlsPatchCall) Context(ctx context.Context) *BucketAccessControlsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucketaccesscontrol)
@@ -808,6 +865,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -869,6 +929,7 @@
entity string
bucketaccesscontrol *BucketAccessControl
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an ACL entry on the specified bucket.
@@ -888,6 +949,14 @@
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 *BucketAccessControlsUpdateCall) Context(ctx context.Context) *BucketAccessControlsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucketaccesscontrol)
@@ -909,6 +978,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -968,6 +1040,7 @@
s *Service
bucket string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes an empty bucket.
@@ -985,6 +1058,14 @@
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 *BucketsDeleteCall) Context(ctx context.Context) *BucketsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -999,6 +1080,9 @@
"bucket": c.bucket,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1042,6 +1126,7 @@
s *Service
bucket string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns metadata for the specified bucket.
@@ -1070,6 +1155,14 @@
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 *BucketsGetCall) Context(ctx context.Context) *BucketsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1087,6 +1180,9 @@
"bucket": c.bucket,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1151,6 +1247,7 @@
s *Service
bucket *Bucket
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a new bucket.
@@ -1181,6 +1278,14 @@
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 *BucketsInsertCall) Context(ctx context.Context) *BucketsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucket)
@@ -1202,6 +1307,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1259,6 +1367,7 @@
s *Service
projectId uint64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of buckets for a given project.
@@ -1302,6 +1411,14 @@
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 *BucketsListCall) Context(ctx context.Context) *BucketsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1324,6 +1441,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1402,6 +1522,7 @@
bucket string
bucket2 *Bucket
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a bucket. This method supports patch semantics.
@@ -1431,6 +1552,14 @@
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 *BucketsPatchCall) Context(ctx context.Context) *BucketsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucket2)
@@ -1454,6 +1583,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1521,6 +1653,7 @@
bucket string
bucket2 *Bucket
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a bucket.
@@ -1550,6 +1683,14 @@
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 *BucketsUpdateCall) Context(ctx context.Context) *BucketsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucket2)
@@ -1573,6 +1714,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1641,6 +1785,7 @@
object string
entity string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the ACL entry for the specified entity on the
@@ -1661,6 +1806,14 @@
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 *ObjectAccessControlsDeleteCall) Context(ctx context.Context) *ObjectAccessControlsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1677,6 +1830,9 @@
"entity": c.entity,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1735,6 +1891,7 @@
object string
entity string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the ACL entry for the specified entity on the specified
@@ -1755,6 +1912,14 @@
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 *ObjectAccessControlsGetCall) Context(ctx context.Context) *ObjectAccessControlsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectAccessControlsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1771,6 +1936,9 @@
"entity": c.entity,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1836,6 +2004,7 @@
object string
objectaccesscontrol *ObjectAccessControl
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a new ACL entry on the specified object.
@@ -1855,6 +2024,14 @@
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 *ObjectAccessControlsInsertCall) Context(ctx context.Context) *ObjectAccessControlsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol)
@@ -1876,6 +2053,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1936,6 +2116,7 @@
bucket string
object string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves ACL entries on the specified object.
@@ -1954,6 +2135,14 @@
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 *ObjectAccessControlsListCall) Context(ctx context.Context) *ObjectAccessControlsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectAccessControlsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1969,6 +2158,9 @@
"object": c.object,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2028,6 +2220,7 @@
entity string
objectaccesscontrol *ObjectAccessControl
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an ACL entry on the specified object. This method
@@ -2049,6 +2242,14 @@
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 *ObjectAccessControlsPatchCall) Context(ctx context.Context) *ObjectAccessControlsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol)
@@ -2071,6 +2272,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2140,6 +2344,7 @@
entity string
objectaccesscontrol *ObjectAccessControl
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an ACL entry on the specified object.
@@ -2160,6 +2365,14 @@
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 *ObjectAccessControlsUpdateCall) Context(ctx context.Context) *ObjectAccessControlsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol)
@@ -2182,6 +2395,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2249,6 +2465,7 @@
bucket string
object string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes data blobs and associated metadata.
@@ -2267,6 +2484,14 @@
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 *ObjectsDeleteCall) Context(ctx context.Context) *ObjectsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2282,6 +2507,9 @@
"object": c.object,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2333,6 +2561,7 @@
bucket string
object string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves objects or their associated metadata.
@@ -2362,6 +2591,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *ObjectsGetCall) Context(ctx context.Context) *ObjectsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2380,6 +2617,9 @@
"object": c.object,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2471,8 +2711,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Insert: Stores new data blobs and associated metadata.
@@ -2511,10 +2751,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *ObjectsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ObjectsInsertCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -2539,6 +2781,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *ObjectsInsertCall) Context(ctx context.Context) *ObjectsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.object)
@@ -2584,6 +2836,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2695,6 +2950,7 @@
s *Service
bucket string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of objects matching the criteria.
@@ -2757,6 +3013,14 @@
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 *ObjectsListCall) Context(ctx context.Context) *ObjectsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2786,6 +3050,9 @@
"bucket": c.bucket,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2875,6 +3142,7 @@
object string
object2 *Object
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a data blob's associated metadata. This method
@@ -2906,6 +3174,14 @@
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 *ObjectsPatchCall) Context(ctx context.Context) *ObjectsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.object2)
@@ -2930,6 +3206,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3005,6 +3284,7 @@
object string
object2 *Object
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a data blob's associated metadata.
@@ -3035,6 +3315,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *ObjectsUpdateCall) Context(ctx context.Context) *ObjectsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.object2)
@@ -3059,6 +3347,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/storage/v1beta2/storage-gen.go b/storage/v1beta2/storage-gen.go
index 634d21e..8543392 100644
--- a/storage/v1beta2/storage-gen.go
+++ b/storage/v1beta2/storage-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "storage:v1beta2"
const apiName = "storage"
@@ -653,6 +653,7 @@
bucket string
entity string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Permanently deletes the ACL entry for the specified entity on
@@ -672,6 +673,14 @@
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 *BucketAccessControlsDeleteCall) Context(ctx context.Context) *BucketAccessControlsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -687,6 +696,9 @@
"entity": c.entity,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -737,6 +749,7 @@
bucket string
entity string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the ACL entry for the specified entity on the specified
@@ -756,6 +769,14 @@
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 *BucketAccessControlsGetCall) Context(ctx context.Context) *BucketAccessControlsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketAccessControlsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -771,6 +792,9 @@
"entity": c.entity,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -828,6 +852,7 @@
bucket string
bucketaccesscontrol *BucketAccessControl
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a new ACL entry on the specified bucket.
@@ -846,6 +871,14 @@
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 *BucketAccessControlsInsertCall) Context(ctx context.Context) *BucketAccessControlsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucketaccesscontrol)
@@ -866,6 +899,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -918,6 +954,7 @@
s *Service
bucket string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves ACL entries on the specified bucket.
@@ -935,6 +972,14 @@
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 *BucketAccessControlsListCall) Context(ctx context.Context) *BucketAccessControlsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketAccessControlsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -949,6 +994,9 @@
"bucket": c.bucket,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1000,6 +1048,7 @@
entity string
bucketaccesscontrol *BucketAccessControl
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an ACL entry on the specified bucket. This method
@@ -1020,6 +1069,14 @@
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 *BucketAccessControlsPatchCall) Context(ctx context.Context) *BucketAccessControlsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucketaccesscontrol)
@@ -1041,6 +1098,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1102,6 +1162,7 @@
entity string
bucketaccesscontrol *BucketAccessControl
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an ACL entry on the specified bucket.
@@ -1121,6 +1182,14 @@
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 *BucketAccessControlsUpdateCall) Context(ctx context.Context) *BucketAccessControlsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucketaccesscontrol)
@@ -1142,6 +1211,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1201,6 +1273,7 @@
s *Service
bucket string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Permanently deletes an empty bucket.
@@ -1236,6 +1309,14 @@
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 *BucketsDeleteCall) Context(ctx context.Context) *BucketsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1256,6 +1337,9 @@
"bucket": c.bucket,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1311,6 +1395,7 @@
s *Service
bucket string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns metadata for the specified bucket.
@@ -1357,6 +1442,14 @@
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 *BucketsGetCall) Context(ctx context.Context) *BucketsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1380,6 +1473,9 @@
"bucket": c.bucket,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1457,6 +1553,7 @@
projectid string
bucket *Bucket
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a new bucket.
@@ -1488,6 +1585,14 @@
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 *BucketsInsertCall) Context(ctx context.Context) *BucketsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucket)
@@ -1510,6 +1615,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1576,6 +1684,7 @@
s *Service
projectid string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of buckets for a given project.
@@ -1619,6 +1728,14 @@
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 *BucketsListCall) Context(ctx context.Context) *BucketsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1641,6 +1758,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1718,6 +1838,7 @@
bucket string
bucket2 *Bucket
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a bucket. This method supports patch semantics.
@@ -1765,6 +1886,14 @@
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 *BucketsPatchCall) Context(ctx context.Context) *BucketsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucket2)
@@ -1794,6 +1923,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1873,6 +2005,7 @@
bucket string
bucket2 *Bucket
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a bucket.
@@ -1920,6 +2053,14 @@
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 *BucketsUpdateCall) Context(ctx context.Context) *BucketsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BucketsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.bucket2)
@@ -1949,6 +2090,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2027,6 +2171,7 @@
s *Service
channel *Channel
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Stop: Stop watching resources through this channel
@@ -2044,6 +2189,14 @@
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 *ChannelsStopCall) Context(ctx context.Context) *ChannelsStopCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChannelsStopCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
@@ -2062,6 +2215,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2100,6 +2256,7 @@
bucket string
entity string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Permanently deletes the default object ACL entry for the
@@ -2119,6 +2276,14 @@
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 *DefaultObjectAccessControlsDeleteCall) Context(ctx context.Context) *DefaultObjectAccessControlsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DefaultObjectAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2134,6 +2299,9 @@
"entity": c.entity,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2184,6 +2352,7 @@
bucket string
entity string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the default object ACL entry for the specified entity on
@@ -2203,6 +2372,14 @@
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 *DefaultObjectAccessControlsGetCall) Context(ctx context.Context) *DefaultObjectAccessControlsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DefaultObjectAccessControlsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2218,6 +2395,9 @@
"entity": c.entity,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2275,6 +2455,7 @@
bucket string
objectaccesscontrol *ObjectAccessControl
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a new default object ACL entry on the specified
@@ -2294,6 +2475,14 @@
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 *DefaultObjectAccessControlsInsertCall) Context(ctx context.Context) *DefaultObjectAccessControlsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DefaultObjectAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol)
@@ -2314,6 +2503,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2366,6 +2558,7 @@
s *Service
bucket string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves default object ACL entries on the specified bucket.
@@ -2400,6 +2593,14 @@
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 *DefaultObjectAccessControlsListCall) Context(ctx context.Context) *DefaultObjectAccessControlsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DefaultObjectAccessControlsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2420,6 +2621,9 @@
"bucket": c.bucket,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2483,6 +2687,7 @@
entity string
objectaccesscontrol *ObjectAccessControl
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a default object ACL entry on the specified bucket.
@@ -2503,6 +2708,14 @@
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 *DefaultObjectAccessControlsPatchCall) Context(ctx context.Context) *DefaultObjectAccessControlsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DefaultObjectAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol)
@@ -2524,6 +2737,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2585,6 +2801,7 @@
entity string
objectaccesscontrol *ObjectAccessControl
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a default object ACL entry on the specified bucket.
@@ -2604,6 +2821,14 @@
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 *DefaultObjectAccessControlsUpdateCall) Context(ctx context.Context) *DefaultObjectAccessControlsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DefaultObjectAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol)
@@ -2625,6 +2850,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2686,6 +2914,7 @@
object string
entity string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Permanently deletes the ACL entry for the specified entity on
@@ -2714,6 +2943,14 @@
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 *ObjectAccessControlsDeleteCall) Context(ctx context.Context) *ObjectAccessControlsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectAccessControlsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2733,6 +2970,9 @@
"entity": c.entity,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2797,6 +3037,7 @@
object string
entity string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the ACL entry for the specified entity on the specified
@@ -2825,6 +3066,14 @@
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 *ObjectAccessControlsGetCall) Context(ctx context.Context) *ObjectAccessControlsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectAccessControlsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2844,6 +3093,9 @@
"entity": c.entity,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2915,6 +3167,7 @@
object string
objectaccesscontrol *ObjectAccessControl
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a new ACL entry on the specified object.
@@ -2942,6 +3195,14 @@
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 *ObjectAccessControlsInsertCall) Context(ctx context.Context) *ObjectAccessControlsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectAccessControlsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol)
@@ -2966,6 +3227,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3032,6 +3296,7 @@
bucket string
object string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves ACL entries on the specified object.
@@ -3058,6 +3323,14 @@
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 *ObjectAccessControlsListCall) Context(ctx context.Context) *ObjectAccessControlsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectAccessControlsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3076,6 +3349,9 @@
"object": c.object,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3141,6 +3417,7 @@
entity string
objectaccesscontrol *ObjectAccessControl
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates an ACL entry on the specified object. This method
@@ -3170,6 +3447,14 @@
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 *ObjectAccessControlsPatchCall) Context(ctx context.Context) *ObjectAccessControlsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectAccessControlsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol)
@@ -3195,6 +3480,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3270,6 +3558,7 @@
entity string
objectaccesscontrol *ObjectAccessControl
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates an ACL entry on the specified object.
@@ -3298,6 +3587,14 @@
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 *ObjectAccessControlsUpdateCall) Context(ctx context.Context) *ObjectAccessControlsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectAccessControlsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.objectaccesscontrol)
@@ -3323,6 +3620,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3397,6 +3697,7 @@
destinationObject string
composerequest *ComposeRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Compose: Concatenates a list of existing objects into a new object in
@@ -3433,6 +3734,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *ObjectsComposeCall) Context(ctx context.Context) *ObjectsComposeCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectsComposeCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.composerequest)
@@ -3460,6 +3769,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3552,6 +3864,7 @@
destinationObject string
object *Object
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Copy: Copies an object to a destination in the same location.
@@ -3664,6 +3977,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *ObjectsCopyCall) Context(ctx context.Context) *ObjectsCopyCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectsCopyCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.object)
@@ -3717,6 +4038,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3875,6 +4199,7 @@
bucket string
object string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes data blobs and associated metadata. Deletions are
@@ -3936,6 +4261,14 @@
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 *ObjectsDeleteCall) Context(ctx context.Context) *ObjectsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3966,6 +4299,9 @@
"object": c.object,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4047,6 +4383,7 @@
bucket string
object string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves objects or their associated metadata.
@@ -4117,6 +4454,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *ObjectsGetCall) Context(ctx context.Context) *ObjectsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4150,6 +4495,9 @@
"object": c.object,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4271,8 +4619,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Insert: Stores new data blobs and associated metadata.
@@ -4344,10 +4692,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *ObjectsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ObjectsInsertCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -4372,6 +4722,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *ObjectsInsertCall) Context(ctx context.Context) *ObjectsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.object)
@@ -4429,6 +4789,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4564,6 +4927,7 @@
s *Service
bucket string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of objects matching the criteria.
@@ -4633,6 +4997,14 @@
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 *ObjectsListCall) Context(ctx context.Context) *ObjectsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4665,6 +5037,9 @@
"bucket": c.bucket,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4759,6 +5134,7 @@
object string
object2 *Object
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a data blob's associated metadata. This method
@@ -4831,6 +5207,14 @@
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 *ObjectsPatchCall) Context(ctx context.Context) *ObjectsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.object2)
@@ -4870,6 +5254,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4975,6 +5362,7 @@
object string
object2 *Object
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a data blob's associated metadata.
@@ -5046,6 +5434,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *ObjectsUpdateCall) Context(ctx context.Context) *ObjectsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.object2)
@@ -5085,6 +5481,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5205,6 +5604,7 @@
bucket string
channel *Channel
opt_ map[string]interface{}
+ ctx_ context.Context
}
// WatchAll: Watch for changes on all objects in a bucket.
@@ -5275,6 +5675,14 @@
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 *ObjectsWatchAllCall) Context(ctx context.Context) *ObjectsWatchAllCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ObjectsWatchAllCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
@@ -5313,6 +5721,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/storagetransfer/v1/storagetransfer-gen.go b/storagetransfer/v1/storagetransfer-gen.go
index c9cce7a..ab0a7ec 100644
--- a/storagetransfer/v1/storagetransfer-gen.go
+++ b/storagetransfer/v1/storagetransfer-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "storagetransfer:v1"
const apiName = "storagetransfer"
@@ -687,6 +687,7 @@
s *Service
projectId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the Google service account that is used by Storage
@@ -711,6 +712,14 @@
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 *GoogleServiceAccountsGetCall) Context(ctx context.Context) *GoogleServiceAccountsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GoogleServiceAccountsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -725,6 +734,9 @@
"projectId": c.projectId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -774,6 +786,7 @@
s *Service
transferjob *TransferJob
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a transfer job that runs periodically.
@@ -791,6 +804,14 @@
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 *TransferJobsCreateCall) Context(ctx context.Context) *TransferJobsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TransferJobsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.transferjob)
@@ -809,6 +830,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -850,6 +874,7 @@
s *Service
jobName string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a transfer job.
@@ -874,6 +899,14 @@
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 *TransferJobsGetCall) Context(ctx context.Context) *TransferJobsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TransferJobsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -891,6 +924,9 @@
"jobName": c.jobName,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -945,6 +981,7 @@
type TransferJobsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists transfer jobs.
@@ -989,6 +1026,14 @@
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 *TransferJobsListCall) Context(ctx context.Context) *TransferJobsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TransferJobsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1010,6 +1055,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1067,6 +1115,7 @@
jobName string
updatetransferjobrequest *UpdateTransferJobRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates a transfer job. Updating a job's transfer spec does
@@ -1087,6 +1136,14 @@
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 *TransferJobsPatchCall) Context(ctx context.Context) *TransferJobsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TransferJobsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.updatetransferjobrequest)
@@ -1107,6 +1164,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1160,6 +1220,7 @@
s *Service
name string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Cancel: Cancels a transfer. Use the get method to check whether the
@@ -1179,6 +1240,14 @@
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 *TransferOperationsCancelCall) Context(ctx context.Context) *TransferOperationsCancelCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TransferOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1193,6 +1262,9 @@
"name": c.name,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1243,6 +1315,7 @@
s *Service
name string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: This method is not supported and the server returns
@@ -1261,6 +1334,14 @@
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 *TransferOperationsDeleteCall) Context(ctx context.Context) *TransferOperationsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TransferOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1275,6 +1356,9 @@
"name": c.name,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1325,6 +1409,7 @@
s *Service
name string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets the latest state of a long-running operation. Clients can
@@ -1344,6 +1429,14 @@
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 *TransferOperationsGetCall) Context(ctx context.Context) *TransferOperationsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TransferOperationsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1358,6 +1451,9 @@
"name": c.name,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1408,6 +1504,7 @@
s *Service
name string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists operations that match the specified filter in the
@@ -1450,6 +1547,14 @@
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 *TransferOperationsListCall) Context(ctx context.Context) *TransferOperationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TransferOperationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1473,6 +1578,9 @@
"name": c.name,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1540,6 +1648,7 @@
name string
pausetransferoperationrequest *PauseTransferOperationRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Pause: Pauses a transfer operation.
@@ -1558,6 +1667,14 @@
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 *TransferOperationsPauseCall) Context(ctx context.Context) *TransferOperationsPauseCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TransferOperationsPauseCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.pausetransferoperationrequest)
@@ -1578,6 +1695,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1632,6 +1752,7 @@
name string
resumetransferoperationrequest *ResumeTransferOperationRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Resume: Resumes a transfer operation that is paused.
@@ -1650,6 +1771,14 @@
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 *TransferOperationsResumeCall) Context(ctx context.Context) *TransferOperationsResumeCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TransferOperationsResumeCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.resumetransferoperationrequest)
@@ -1670,6 +1799,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1722,6 +1854,7 @@
type V1GetGoogleServiceAccountCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetGoogleServiceAccount: Returns the Google service account that is
@@ -1753,6 +1886,14 @@
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 *V1GetGoogleServiceAccountCall) Context(ctx context.Context) *V1GetGoogleServiceAccountCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *V1GetGoogleServiceAccountCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1768,6 +1909,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/tagmanager/v1/tagmanager-gen.go b/tagmanager/v1/tagmanager-gen.go
index 6ddeee4..eef9776 100644
--- a/tagmanager/v1/tagmanager-gen.go
+++ b/tagmanager/v1/tagmanager-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "tagmanager:v1"
const apiName = "tagmanager"
@@ -1012,6 +1012,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a GTM Account.
@@ -1029,6 +1030,14 @@
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 *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1043,6 +1052,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1093,6 +1105,7 @@
type AccountsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all GTM Accounts that a user has access to.
@@ -1109,6 +1122,14 @@
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 *AccountsListCall) Context(ctx context.Context) *AccountsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1121,6 +1142,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1162,6 +1186,7 @@
accountId string
account *Account
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a GTM Account.
@@ -1188,6 +1213,14 @@
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 *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
@@ -1211,6 +1244,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1269,6 +1305,7 @@
accountId string
container *Container
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a Container.
@@ -1287,6 +1324,14 @@
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 *AccountsContainersCreateCall) Context(ctx context.Context) *AccountsContainersCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.container)
@@ -1307,6 +1352,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1360,6 +1408,7 @@
accountId string
containerId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a Container.
@@ -1378,6 +1427,14 @@
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 *AccountsContainersDeleteCall) Context(ctx context.Context) *AccountsContainersDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1393,6 +1450,9 @@
"containerId": c.containerId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1443,6 +1503,7 @@
accountId string
containerId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a Container.
@@ -1461,6 +1522,14 @@
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 *AccountsContainersGetCall) Context(ctx context.Context) *AccountsContainersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1476,6 +1545,9 @@
"containerId": c.containerId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1533,6 +1605,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all Containers that belongs to a GTM Account.
@@ -1550,6 +1623,14 @@
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 *AccountsContainersListCall) Context(ctx context.Context) *AccountsContainersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1564,6 +1645,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1616,6 +1700,7 @@
containerId string
container *Container
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a Container.
@@ -1643,6 +1728,14 @@
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 *AccountsContainersUpdateCall) Context(ctx context.Context) *AccountsContainersUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.container)
@@ -1667,6 +1760,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1733,6 +1829,7 @@
containerId string
folder *Folder
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a GTM Folder.
@@ -1752,6 +1849,14 @@
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 *AccountsContainersFoldersCreateCall) Context(ctx context.Context) *AccountsContainersFoldersCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersFoldersCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.folder)
@@ -1773,6 +1878,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1834,6 +1942,7 @@
containerId string
folderId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a GTM Folder.
@@ -1853,6 +1962,14 @@
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 *AccountsContainersFoldersDeleteCall) Context(ctx context.Context) *AccountsContainersFoldersDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersFoldersDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1869,6 +1986,9 @@
"folderId": c.folderId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1927,6 +2047,7 @@
containerId string
folderId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a GTM Folder.
@@ -1946,6 +2067,14 @@
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 *AccountsContainersFoldersGetCall) Context(ctx context.Context) *AccountsContainersFoldersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersFoldersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1962,6 +2091,9 @@
"folderId": c.folderId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2027,6 +2159,7 @@
accountId string
containerId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all GTM Folders of a Container.
@@ -2045,6 +2178,14 @@
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 *AccountsContainersFoldersListCall) Context(ctx context.Context) *AccountsContainersFoldersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersFoldersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2060,6 +2201,9 @@
"containerId": c.containerId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2120,6 +2264,7 @@
folderId string
folder *Folder
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a GTM Folder.
@@ -2147,6 +2292,14 @@
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 *AccountsContainersFoldersUpdateCall) Context(ctx context.Context) *AccountsContainersFoldersUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersFoldersUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.folder)
@@ -2172,6 +2325,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2245,6 +2401,7 @@
containerId string
folderId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all entities in a GTM Folder.
@@ -2264,6 +2421,14 @@
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 *AccountsContainersFoldersEntitiesListCall) Context(ctx context.Context) *AccountsContainersFoldersEntitiesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersFoldersEntitiesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2280,6 +2445,9 @@
"folderId": c.folderId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2346,6 +2514,7 @@
containerId string
macro *Macro
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a GTM Macro.
@@ -2365,6 +2534,14 @@
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 *AccountsContainersMacrosCreateCall) Context(ctx context.Context) *AccountsContainersMacrosCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersMacrosCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.macro)
@@ -2386,6 +2563,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2447,6 +2627,7 @@
containerId string
macroId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a GTM Macro.
@@ -2466,6 +2647,14 @@
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 *AccountsContainersMacrosDeleteCall) Context(ctx context.Context) *AccountsContainersMacrosDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersMacrosDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2482,6 +2671,9 @@
"macroId": c.macroId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2540,6 +2732,7 @@
containerId string
macroId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a GTM Macro.
@@ -2559,6 +2752,14 @@
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 *AccountsContainersMacrosGetCall) Context(ctx context.Context) *AccountsContainersMacrosGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersMacrosGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2575,6 +2776,9 @@
"macroId": c.macroId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2640,6 +2844,7 @@
accountId string
containerId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all GTM Macros of a Container.
@@ -2658,6 +2863,14 @@
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 *AccountsContainersMacrosListCall) Context(ctx context.Context) *AccountsContainersMacrosListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersMacrosListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2673,6 +2886,9 @@
"containerId": c.containerId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2733,6 +2949,7 @@
macroId string
macro *Macro
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a GTM Macro.
@@ -2760,6 +2977,14 @@
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 *AccountsContainersMacrosUpdateCall) Context(ctx context.Context) *AccountsContainersMacrosUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersMacrosUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.macro)
@@ -2785,6 +3010,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2858,6 +3086,7 @@
containerId string
folderId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Moves entities to a GTM Folder.
@@ -2898,6 +3127,14 @@
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 *AccountsContainersMoveFoldersUpdateCall) Context(ctx context.Context) *AccountsContainersMoveFoldersUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersMoveFoldersUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -2923,6 +3160,9 @@
"folderId": c.folderId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -2996,6 +3236,7 @@
containerId string
rule *Rule
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a GTM Rule.
@@ -3015,6 +3256,14 @@
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 *AccountsContainersRulesCreateCall) Context(ctx context.Context) *AccountsContainersRulesCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersRulesCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.rule)
@@ -3036,6 +3285,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3097,6 +3349,7 @@
containerId string
ruleId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a GTM Rule.
@@ -3116,6 +3369,14 @@
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 *AccountsContainersRulesDeleteCall) Context(ctx context.Context) *AccountsContainersRulesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersRulesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3132,6 +3393,9 @@
"ruleId": c.ruleId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3190,6 +3454,7 @@
containerId string
ruleId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a GTM Rule.
@@ -3209,6 +3474,14 @@
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 *AccountsContainersRulesGetCall) Context(ctx context.Context) *AccountsContainersRulesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersRulesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3225,6 +3498,9 @@
"ruleId": c.ruleId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3290,6 +3566,7 @@
accountId string
containerId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all GTM Rules of a Container.
@@ -3308,6 +3585,14 @@
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 *AccountsContainersRulesListCall) Context(ctx context.Context) *AccountsContainersRulesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersRulesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3323,6 +3608,9 @@
"containerId": c.containerId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3383,6 +3671,7 @@
ruleId string
rule *Rule
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a GTM Rule.
@@ -3410,6 +3699,14 @@
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 *AccountsContainersRulesUpdateCall) Context(ctx context.Context) *AccountsContainersRulesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersRulesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.rule)
@@ -3435,6 +3732,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3508,6 +3808,7 @@
containerId string
tag *Tag
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a GTM Tag.
@@ -3527,6 +3828,14 @@
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 *AccountsContainersTagsCreateCall) Context(ctx context.Context) *AccountsContainersTagsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersTagsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.tag)
@@ -3548,6 +3857,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3609,6 +3921,7 @@
containerId string
tagId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a GTM Tag.
@@ -3628,6 +3941,14 @@
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 *AccountsContainersTagsDeleteCall) Context(ctx context.Context) *AccountsContainersTagsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersTagsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3644,6 +3965,9 @@
"tagId": c.tagId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3702,6 +4026,7 @@
containerId string
tagId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a GTM Tag.
@@ -3721,6 +4046,14 @@
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 *AccountsContainersTagsGetCall) Context(ctx context.Context) *AccountsContainersTagsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersTagsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3737,6 +4070,9 @@
"tagId": c.tagId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3802,6 +4138,7 @@
accountId string
containerId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all GTM Tags of a Container.
@@ -3820,6 +4157,14 @@
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 *AccountsContainersTagsListCall) Context(ctx context.Context) *AccountsContainersTagsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersTagsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -3835,6 +4180,9 @@
"containerId": c.containerId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -3895,6 +4243,7 @@
tagId string
tag *Tag
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a GTM Tag.
@@ -3922,6 +4271,14 @@
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 *AccountsContainersTagsUpdateCall) Context(ctx context.Context) *AccountsContainersTagsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersTagsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.tag)
@@ -3947,6 +4304,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4020,6 +4380,7 @@
containerId string
trigger *Trigger
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a GTM Trigger.
@@ -4039,6 +4400,14 @@
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 *AccountsContainersTriggersCreateCall) Context(ctx context.Context) *AccountsContainersTriggersCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersTriggersCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.trigger)
@@ -4060,6 +4429,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4121,6 +4493,7 @@
containerId string
triggerId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a GTM Trigger.
@@ -4140,6 +4513,14 @@
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 *AccountsContainersTriggersDeleteCall) Context(ctx context.Context) *AccountsContainersTriggersDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersTriggersDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4156,6 +4537,9 @@
"triggerId": c.triggerId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4214,6 +4598,7 @@
containerId string
triggerId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a GTM Trigger.
@@ -4233,6 +4618,14 @@
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 *AccountsContainersTriggersGetCall) Context(ctx context.Context) *AccountsContainersTriggersGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersTriggersGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4249,6 +4642,9 @@
"triggerId": c.triggerId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4314,6 +4710,7 @@
accountId string
containerId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all GTM Triggers of a Container.
@@ -4332,6 +4729,14 @@
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 *AccountsContainersTriggersListCall) Context(ctx context.Context) *AccountsContainersTriggersListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersTriggersListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4347,6 +4752,9 @@
"containerId": c.containerId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4407,6 +4815,7 @@
triggerId string
trigger *Trigger
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a GTM Trigger.
@@ -4435,6 +4844,14 @@
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 *AccountsContainersTriggersUpdateCall) Context(ctx context.Context) *AccountsContainersTriggersUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersTriggersUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.trigger)
@@ -4460,6 +4877,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4533,6 +4953,7 @@
containerId string
variable *Variable
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a GTM Variable.
@@ -4552,6 +4973,14 @@
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 *AccountsContainersVariablesCreateCall) Context(ctx context.Context) *AccountsContainersVariablesCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersVariablesCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.variable)
@@ -4573,6 +5002,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4634,6 +5066,7 @@
containerId string
variableId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a GTM Variable.
@@ -4653,6 +5086,14 @@
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 *AccountsContainersVariablesDeleteCall) Context(ctx context.Context) *AccountsContainersVariablesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersVariablesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4669,6 +5110,9 @@
"variableId": c.variableId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4727,6 +5171,7 @@
containerId string
variableId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a GTM Variable.
@@ -4746,6 +5191,14 @@
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 *AccountsContainersVariablesGetCall) Context(ctx context.Context) *AccountsContainersVariablesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersVariablesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4762,6 +5215,9 @@
"variableId": c.variableId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4827,6 +5283,7 @@
accountId string
containerId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all GTM Variables of a Container.
@@ -4845,6 +5302,14 @@
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 *AccountsContainersVariablesListCall) Context(ctx context.Context) *AccountsContainersVariablesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersVariablesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -4860,6 +5325,9 @@
"containerId": c.containerId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4920,6 +5388,7 @@
variableId string
variable *Variable
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a GTM Variable.
@@ -4948,6 +5417,14 @@
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 *AccountsContainersVariablesUpdateCall) Context(ctx context.Context) *AccountsContainersVariablesUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersVariablesUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.variable)
@@ -4973,6 +5450,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5046,6 +5526,7 @@
containerId string
createcontainerversionrequestversionoptions *CreateContainerVersionRequestVersionOptions
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a Container Version.
@@ -5065,6 +5546,14 @@
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 *AccountsContainersVersionsCreateCall) Context(ctx context.Context) *AccountsContainersVersionsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersVersionsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.createcontainerversionrequestversionoptions)
@@ -5086,6 +5575,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5147,6 +5639,7 @@
containerId string
containerVersionId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a Container Version.
@@ -5166,6 +5659,14 @@
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 *AccountsContainersVersionsDeleteCall) Context(ctx context.Context) *AccountsContainersVersionsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersVersionsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5182,6 +5683,9 @@
"containerVersionId": c.containerVersionId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5240,6 +5744,7 @@
containerId string
containerVersionId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a Container Version.
@@ -5259,6 +5764,14 @@
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 *AccountsContainersVersionsGetCall) Context(ctx context.Context) *AccountsContainersVersionsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersVersionsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5275,6 +5788,9 @@
"containerVersionId": c.containerVersionId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5341,6 +5857,7 @@
accountId string
containerId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists all Container Versions of a GTM Container.
@@ -5366,6 +5883,14 @@
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 *AccountsContainersVersionsListCall) Context(ctx context.Context) *AccountsContainersVersionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersVersionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5384,6 +5909,9 @@
"containerId": c.containerId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5450,6 +5978,7 @@
containerId string
containerVersionId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Publish: Publishes a Container Version.
@@ -5477,6 +6006,14 @@
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 *AccountsContainersVersionsPublishCall) Context(ctx context.Context) *AccountsContainersVersionsPublishCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersVersionsPublishCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5496,6 +6033,9 @@
"containerVersionId": c.containerVersionId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5566,6 +6106,7 @@
containerId string
containerVersionId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Restore: Restores a Container Version. This will overwrite the
@@ -5588,6 +6129,14 @@
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 *AccountsContainersVersionsRestoreCall) Context(ctx context.Context) *AccountsContainersVersionsRestoreCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersVersionsRestoreCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5604,6 +6153,9 @@
"containerVersionId": c.containerVersionId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5669,6 +6221,7 @@
containerId string
containerVersionId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Undelete: Undeletes a Container Version.
@@ -5688,6 +6241,14 @@
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 *AccountsContainersVersionsUndeleteCall) Context(ctx context.Context) *AccountsContainersVersionsUndeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersVersionsUndeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5704,6 +6265,9 @@
"containerVersionId": c.containerVersionId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5770,6 +6334,7 @@
containerVersionId string
containerversion *ContainerVersion
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a Container Version.
@@ -5798,6 +6363,14 @@
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 *AccountsContainersVersionsUpdateCall) Context(ctx context.Context) *AccountsContainersVersionsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsContainersVersionsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.containerversion)
@@ -5823,6 +6396,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5895,6 +6471,7 @@
accountId string
useraccess *UserAccess
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Create: Creates a user's Account & Container Permissions.
@@ -5913,6 +6490,14 @@
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 *AccountsPermissionsCreateCall) Context(ctx context.Context) *AccountsPermissionsCreateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsPermissionsCreateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.useraccess)
@@ -5933,6 +6518,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5986,6 +6574,7 @@
accountId string
permissionId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Removes a user from the account, revoking access to it and
@@ -6005,6 +6594,14 @@
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 *AccountsPermissionsDeleteCall) Context(ctx context.Context) *AccountsPermissionsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsPermissionsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6020,6 +6617,9 @@
"permissionId": c.permissionId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6070,6 +6670,7 @@
accountId string
permissionId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Gets a user's Account & Container Permissions.
@@ -6088,6 +6689,14 @@
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 *AccountsPermissionsGetCall) Context(ctx context.Context) *AccountsPermissionsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsPermissionsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6103,6 +6712,9 @@
"permissionId": c.permissionId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6159,6 +6771,7 @@
s *Service
accountId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List all users that have access to the account along with
@@ -6177,6 +6790,14 @@
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 *AccountsPermissionsListCall) Context(ctx context.Context) *AccountsPermissionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsPermissionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6191,6 +6812,9 @@
"accountId": c.accountId,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6242,6 +6866,7 @@
permissionId string
useraccess *UserAccess
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a user's Account & Container Permissions.
@@ -6261,6 +6886,14 @@
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 *AccountsPermissionsUpdateCall) Context(ctx context.Context) *AccountsPermissionsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *AccountsPermissionsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.useraccess)
@@ -6282,6 +6915,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/taskqueue/v1beta1/taskqueue-gen.go b/taskqueue/v1beta1/taskqueue-gen.go
index 32b8215..3bbd1c5 100644
--- a/taskqueue/v1beta1/taskqueue-gen.go
+++ b/taskqueue/v1beta1/taskqueue-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "taskqueue:v1beta1"
const apiName = "taskqueue"
@@ -195,6 +195,7 @@
project string
taskqueue string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get detailed information about a TaskQueue.
@@ -220,6 +221,14 @@
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 *TaskqueuesGetCall) Context(ctx context.Context) *TaskqueuesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TaskqueuesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -238,6 +247,9 @@
"taskqueue": c.taskqueue,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -302,6 +314,7 @@
taskqueue string
task string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a task from a TaskQueue.
@@ -321,6 +334,14 @@
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 *TasksDeleteCall) Context(ctx context.Context) *TasksDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TasksDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -337,6 +358,9 @@
"task": c.task,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -396,6 +420,7 @@
taskqueue string
task string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get a particular task from a TaskQueue.
@@ -415,6 +440,14 @@
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 *TasksGetCall) Context(ctx context.Context) *TasksGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TasksGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -431,6 +464,9 @@
"task": c.task,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -498,6 +534,7 @@
numTasks int64
leaseSecs int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Lease: Lease 1 or more tasks from a TaskQueue.
@@ -518,6 +555,14 @@
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 *TasksLeaseCall) Context(ctx context.Context) *TasksLeaseCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TasksLeaseCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -535,6 +580,9 @@
"taskqueue": c.taskqueue,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -609,6 +657,7 @@
project string
taskqueue string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List Tasks in a TaskQueue
@@ -627,6 +676,14 @@
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 *TasksListCall) Context(ctx context.Context) *TasksListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TasksListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -642,6 +699,9 @@
"taskqueue": c.taskqueue,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/taskqueue/v1beta2/taskqueue-gen.go b/taskqueue/v1beta2/taskqueue-gen.go
index f2cb1f1..05c0bc1 100644
--- a/taskqueue/v1beta2/taskqueue-gen.go
+++ b/taskqueue/v1beta2/taskqueue-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "taskqueue:v1beta2"
const apiName = "taskqueue"
@@ -202,6 +202,7 @@
project string
taskqueue string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get detailed information about a TaskQueue.
@@ -227,6 +228,14 @@
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 *TaskqueuesGetCall) Context(ctx context.Context) *TaskqueuesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TaskqueuesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -245,6 +254,9 @@
"taskqueue": c.taskqueue,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -309,6 +321,7 @@
taskqueue string
task string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Delete a task from a TaskQueue.
@@ -328,6 +341,14 @@
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 *TasksDeleteCall) Context(ctx context.Context) *TasksDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TasksDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -344,6 +365,9 @@
"task": c.task,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -403,6 +427,7 @@
taskqueue string
task string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Get a particular task from a TaskQueue.
@@ -422,6 +447,14 @@
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 *TasksGetCall) Context(ctx context.Context) *TasksGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TasksGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -438,6 +471,9 @@
"task": c.task,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -504,6 +540,7 @@
taskqueue string
task *Task
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Insert a new task in a TaskQueue
@@ -523,6 +560,14 @@
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 *TasksInsertCall) Context(ctx context.Context) *TasksInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TasksInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.task)
@@ -544,6 +589,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -607,6 +655,7 @@
numTasks int64
leaseSecs int64
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Lease: Lease 1 or more tasks from a TaskQueue.
@@ -643,6 +692,14 @@
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 *TasksLeaseCall) Context(ctx context.Context) *TasksLeaseCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TasksLeaseCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -666,6 +723,9 @@
"taskqueue": c.taskqueue,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -750,6 +810,7 @@
project string
taskqueue string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List Tasks in a TaskQueue
@@ -768,6 +829,14 @@
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 *TasksListCall) Context(ctx context.Context) *TasksListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TasksListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -783,6 +852,9 @@
"taskqueue": c.taskqueue,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -844,6 +916,7 @@
newLeaseSeconds int64
task2 *Task
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Update tasks that are leased out of a TaskQueue. This method
@@ -866,6 +939,14 @@
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 *TasksPatchCall) Context(ctx context.Context) *TasksPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TasksPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.task2)
@@ -889,6 +970,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -966,6 +1050,7 @@
newLeaseSeconds int64
task2 *Task
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Update tasks that are leased out of a TaskQueue.
@@ -987,6 +1072,14 @@
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 *TasksUpdateCall) Context(ctx context.Context) *TasksUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TasksUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.task2)
@@ -1010,6 +1103,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/tasks/v1/tasks-gen.go b/tasks/v1/tasks-gen.go
index a446bcd..c4c67ce 100644
--- a/tasks/v1/tasks-gen.go
+++ b/tasks/v1/tasks-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "tasks:v1"
const apiName = "tasks"
@@ -226,6 +226,7 @@
s *Service
tasklistid string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the authenticated user's specified task list.
@@ -243,6 +244,14 @@
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 *TasklistsDeleteCall) Context(ctx context.Context) *TasklistsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TasklistsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -257,6 +266,9 @@
"tasklist": c.tasklistid,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -299,6 +311,7 @@
s *Service
tasklistid string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the authenticated user's specified task list.
@@ -316,6 +329,14 @@
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 *TasklistsGetCall) Context(ctx context.Context) *TasklistsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TasklistsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -330,6 +351,9 @@
"tasklist": c.tasklistid,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -380,6 +404,7 @@
s *Service
tasklist *TaskList
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a new task list and adds it to the authenticated
@@ -398,6 +423,14 @@
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 *TasklistsInsertCall) Context(ctx context.Context) *TasklistsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TasklistsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.tasklist)
@@ -416,6 +449,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -456,6 +492,7 @@
type TasklistsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns all the authenticated user's task lists.
@@ -486,6 +523,14 @@
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 *TasklistsListCall) Context(ctx context.Context) *TasklistsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TasklistsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -504,6 +549,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -557,6 +605,7 @@
tasklistid string
tasklist *TaskList
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates the authenticated user's specified task list. This
@@ -576,6 +625,14 @@
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 *TasklistsPatchCall) Context(ctx context.Context) *TasklistsPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TasklistsPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.tasklist)
@@ -596,6 +653,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -649,6 +709,7 @@
tasklistid string
tasklist *TaskList
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates the authenticated user's specified task list.
@@ -667,6 +728,14 @@
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 *TasklistsUpdateCall) Context(ctx context.Context) *TasklistsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TasklistsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.tasklist)
@@ -687,6 +756,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -739,6 +811,7 @@
s *Service
tasklistid string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Clear: Clears all completed tasks from the specified task list. The
@@ -758,6 +831,14 @@
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 *TasksClearCall) Context(ctx context.Context) *TasksClearCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TasksClearCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -772,6 +853,9 @@
"tasklist": c.tasklistid,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -815,6 +899,7 @@
tasklistid string
taskid string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes the specified task from the task list.
@@ -833,6 +918,14 @@
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 *TasksDeleteCall) Context(ctx context.Context) *TasksDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TasksDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -848,6 +941,9 @@
"task": c.taskid,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -898,6 +994,7 @@
tasklistid string
taskid string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Returns the specified task.
@@ -916,6 +1013,14 @@
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 *TasksGetCall) Context(ctx context.Context) *TasksGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TasksGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -931,6 +1036,9 @@
"task": c.taskid,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -989,6 +1097,7 @@
tasklistid string
task *Task
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a new task on the specified task list.
@@ -1022,6 +1131,14 @@
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 *TasksInsertCall) Context(ctx context.Context) *TasksInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TasksInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.task)
@@ -1048,6 +1165,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1110,6 +1230,7 @@
s *Service
tasklistid string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns all tasks in the specified task list.
@@ -1205,6 +1326,14 @@
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 *TasksListCall) Context(ctx context.Context) *TasksListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TasksListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1249,6 +1378,9 @@
"tasklist": c.tasklistid,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1351,6 +1483,7 @@
tasklistid string
taskid string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Move: Moves the specified task to another position in the task list.
@@ -1387,6 +1520,14 @@
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 *TasksMoveCall) Context(ctx context.Context) *TasksMoveCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TasksMoveCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1408,6 +1549,9 @@
"task": c.taskid,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1476,6 +1620,7 @@
taskid string
task *Task
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Patch: Updates the specified task. This method supports patch
@@ -1496,6 +1641,14 @@
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 *TasksPatchCall) Context(ctx context.Context) *TasksPatchCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TasksPatchCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.task)
@@ -1517,6 +1670,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1578,6 +1734,7 @@
taskid string
task *Task
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates the specified task.
@@ -1597,6 +1754,14 @@
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 *TasksUpdateCall) Context(ctx context.Context) *TasksUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TasksUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.task)
@@ -1618,6 +1783,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/translate/v2/translate-gen.go b/translate/v2/translate-gen.go
index dc04021..c9db74c 100644
--- a/translate/v2/translate-gen.go
+++ b/translate/v2/translate-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "translate:v2"
const apiName = "translate"
@@ -154,6 +154,7 @@
s *Service
q []string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Detect the language of text.
@@ -171,6 +172,14 @@
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 *DetectionsListCall) Context(ctx context.Context) *DetectionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *DetectionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -186,6 +195,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -232,6 +244,7 @@
type LanguagesListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: List the source/target languages supported by the API
@@ -255,6 +268,14 @@
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 *LanguagesListCall) Context(ctx context.Context) *LanguagesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LanguagesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -270,6 +291,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -313,6 +337,7 @@
q []string
target string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns text translations from one language to another.
@@ -355,6 +380,14 @@
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 *TranslationsListCall) Context(ctx context.Context) *TranslationsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *TranslationsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -380,6 +413,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/urlshortener/v1/urlshortener-gen.go b/urlshortener/v1/urlshortener-gen.go
index 1ef533d..25e2568 100644
--- a/urlshortener/v1/urlshortener-gen.go
+++ b/urlshortener/v1/urlshortener-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "urlshortener:v1"
const apiName = "urlshortener"
@@ -184,6 +184,7 @@
s *Service
shortUrl string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Expands a short URL or gets creation time and analytics.
@@ -214,6 +215,14 @@
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 *UrlGetCall) Context(ctx context.Context) *UrlGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UrlGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -230,6 +239,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -294,6 +306,7 @@
s *Service
url *Url
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a new short URL.
@@ -311,6 +324,14 @@
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 *UrlInsertCall) Context(ctx context.Context) *UrlInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UrlInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.url)
@@ -329,6 +350,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -369,6 +393,7 @@
type UrlListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of URLs shortened by a user.
@@ -403,6 +428,14 @@
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 *UrlListCall) Context(ctx context.Context) *UrlListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UrlListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -421,6 +454,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/webfonts/v1/webfonts-gen.go b/webfonts/v1/webfonts-gen.go
index d85c0a4..0262373 100644
--- a/webfonts/v1/webfonts-gen.go
+++ b/webfonts/v1/webfonts-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "webfonts:v1"
const apiName = "webfonts"
@@ -116,6 +116,7 @@
type WebfontsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves the list of fonts currently served by the Google
@@ -146,6 +147,14 @@
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 *WebfontsListCall) Context(ctx context.Context) *WebfontsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *WebfontsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -161,6 +170,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/webmasters/v3/webmasters-gen.go b/webmasters/v3/webmasters-gen.go
index 44c2ba1..19c3460 100644
--- a/webmasters/v3/webmasters-gen.go
+++ b/webmasters/v3/webmasters-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "webmasters:v3"
const apiName = "webmasters"
@@ -373,6 +373,7 @@
siteUrl string
searchanalyticsqueryrequest *SearchAnalyticsQueryRequest
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Query: Query your data with filters and parameters that you define.
@@ -398,6 +399,14 @@
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 *SearchanalyticsQueryCall) Context(ctx context.Context) *SearchanalyticsQueryCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SearchanalyticsQueryCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchanalyticsqueryrequest)
@@ -418,6 +427,9 @@
})
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -472,6 +484,7 @@
siteUrl string
feedpath string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a sitemap from this site.
@@ -490,6 +503,14 @@
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 *SitemapsDeleteCall) Context(ctx context.Context) *SitemapsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SitemapsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -505,6 +526,9 @@
"feedpath": c.feedpath,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -555,6 +579,7 @@
siteUrl string
feedpath string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves information about a specific sitemap.
@@ -573,6 +598,14 @@
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 *SitemapsGetCall) Context(ctx context.Context) *SitemapsGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SitemapsGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -588,6 +621,9 @@
"feedpath": c.feedpath,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -645,6 +681,7 @@
s *Service
siteUrl string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the sitemaps-entries submitted for this site, or included
@@ -672,6 +709,14 @@
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 *SitemapsListCall) Context(ctx context.Context) *SitemapsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SitemapsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -689,6 +734,9 @@
"siteUrl": c.siteUrl,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -745,6 +793,7 @@
siteUrl string
feedpath string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Submit: Submits a sitemap for a site.
@@ -763,6 +812,14 @@
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 *SitemapsSubmitCall) Context(ctx context.Context) *SitemapsSubmitCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SitemapsSubmitCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -778,6 +835,9 @@
"feedpath": c.feedpath,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -827,6 +887,7 @@
s *Service
siteUrl string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Add: Adds a site to the set of the user's sites in Webmaster Tools.
@@ -844,6 +905,14 @@
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 *SitesAddCall) Context(ctx context.Context) *SitesAddCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SitesAddCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -858,6 +927,9 @@
"siteUrl": c.siteUrl,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -900,6 +972,7 @@
s *Service
siteUrl string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Removes a site from the set of the user's Webmaster Tools
@@ -918,6 +991,14 @@
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 *SitesDeleteCall) Context(ctx context.Context) *SitesDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SitesDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -932,6 +1013,9 @@
"siteUrl": c.siteUrl,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -974,6 +1058,7 @@
s *Service
siteUrl string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves information about specific site.
@@ -991,6 +1076,14 @@
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 *SitesGetCall) Context(ctx context.Context) *SitesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SitesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1005,6 +1098,9 @@
"siteUrl": c.siteUrl,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1054,6 +1150,7 @@
type SitesListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists the user's Webmaster Tools sites.
@@ -1070,6 +1167,14 @@
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 *SitesListCall) Context(ctx context.Context) *SitesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SitesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1082,6 +1187,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1121,6 +1229,7 @@
s *Service
siteUrl string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Query: Retrieves a time series of the number of URL crawl errors per
@@ -1177,6 +1286,14 @@
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 *UrlcrawlerrorscountsQueryCall) Context(ctx context.Context) *UrlcrawlerrorscountsQueryCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UrlcrawlerrorscountsQueryCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1200,6 +1317,9 @@
"siteUrl": c.siteUrl,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1299,6 +1419,7 @@
category string
platform string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Get: Retrieves details about crawl errors for a site's sample URL.
@@ -1319,6 +1440,14 @@
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 *UrlcrawlerrorssamplesGetCall) Context(ctx context.Context) *UrlcrawlerrorssamplesGetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UrlcrawlerrorssamplesGetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1336,6 +1465,9 @@
"url": c.url,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1439,6 +1571,7 @@
category string
platform string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Lists a site's sample URLs for the specified crawl error
@@ -1459,6 +1592,14 @@
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 *UrlcrawlerrorssamplesListCall) Context(ctx context.Context) *UrlcrawlerrorssamplesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UrlcrawlerrorssamplesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1475,6 +1616,9 @@
"siteUrl": c.siteUrl,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1572,6 +1716,7 @@
category string
platform string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// MarkAsFixed: Marks the provided site's sample URL as fixed, and
@@ -1593,6 +1738,14 @@
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 *UrlcrawlerrorssamplesMarkAsFixedCall) Context(ctx context.Context) *UrlcrawlerrorssamplesMarkAsFixedCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *UrlcrawlerrorssamplesMarkAsFixedCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1610,6 +1763,9 @@
"url": c.url,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/youtube/v3/youtube-gen.go b/youtube/v3/youtube-gen.go
index 8215f33..8836050 100644
--- a/youtube/v3/youtube-gen.go
+++ b/youtube/v3/youtube-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "youtube:v3"
const apiName = "youtube"
@@ -4895,6 +4895,7 @@
part string
activity *Activity
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Posts a bulletin for a specific channel. (The user submitting
@@ -4922,6 +4923,14 @@
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 *ActivitiesInsertCall) Context(ctx context.Context) *ActivitiesInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ActivitiesInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.activity)
@@ -4941,6 +4950,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -4994,6 +5006,7 @@
s *Service
part string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns a list of channel activity events that match the
@@ -5090,6 +5103,14 @@
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 *ActivitiesListCall) Context(ctx context.Context) *ActivitiesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ActivitiesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5127,6 +5148,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5224,6 +5248,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a specified caption track.
@@ -5267,6 +5292,14 @@
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 *CaptionsDeleteCall) Context(ctx context.Context) *CaptionsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CaptionsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5286,6 +5319,9 @@
req, _ := http.NewRequest("DELETE", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5339,6 +5375,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Download: Downloads a caption track. The caption track is returned in
@@ -5412,6 +5449,14 @@
return c
}
+// Context sets the context to be used in this call's Do and Download methods.
+// Any pending HTTP request will be aborted if the provided context
+// is canceled.
+func (c *CaptionsDownloadCall) Context(ctx context.Context) *CaptionsDownloadCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CaptionsDownloadCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5438,6 +5483,9 @@
"id": c.id,
})
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5535,8 +5583,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Insert: Uploads a caption track.
@@ -5595,10 +5643,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *CaptionsInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *CaptionsInsertCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -5623,6 +5673,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *CaptionsInsertCall) Context(ctx context.Context) *CaptionsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CaptionsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.caption)
@@ -5670,6 +5730,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5781,6 +5844,7 @@
part string
videoId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns a list of caption tracks that are associated with a
@@ -5837,6 +5901,14 @@
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 *CaptionsListCall) Context(ctx context.Context) *CaptionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CaptionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -5860,6 +5932,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -5936,8 +6011,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Update: Updates a caption track. When updating a caption track, you
@@ -5997,10 +6072,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *CaptionsUpdateCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *CaptionsUpdateCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -6025,6 +6102,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *CaptionsUpdateCall) Context(ctx context.Context) *CaptionsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CaptionsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.caption)
@@ -6072,6 +6159,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6185,8 +6275,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Insert: Uploads a channel banner image to YouTube. This method
@@ -6233,10 +6323,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *ChannelBannersInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ChannelBannersInsertCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -6261,6 +6353,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *ChannelBannersInsertCall) Context(ctx context.Context) *ChannelBannersInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChannelBannersInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.channelbannerresource)
@@ -6301,6 +6403,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6393,6 +6498,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a channelSection.
@@ -6428,6 +6534,14 @@
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 *ChannelSectionsDeleteCall) Context(ctx context.Context) *ChannelSectionsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChannelSectionsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6444,6 +6558,9 @@
req, _ := http.NewRequest("DELETE", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6494,6 +6611,7 @@
part string
channelsection *ChannelSection
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Adds a channelSection for the authenticated user's channel.
@@ -6556,6 +6674,14 @@
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 *ChannelSectionsInsertCall) Context(ctx context.Context) *ChannelSectionsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChannelSectionsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.channelsection)
@@ -6581,6 +6707,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6645,6 +6774,7 @@
s *Service
part string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns channelSection resources that match the API request
@@ -6719,6 +6849,14 @@
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 *ChannelSectionsListCall) Context(ctx context.Context) *ChannelSectionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChannelSectionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -6747,6 +6885,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6825,6 +6966,7 @@
part string
channelsection *ChannelSection
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Update a channelSection.
@@ -6861,6 +7003,14 @@
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 *ChannelSectionsUpdateCall) Context(ctx context.Context) *ChannelSectionsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChannelSectionsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.channelsection)
@@ -6883,6 +7033,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -6942,6 +7095,7 @@
s *Service
part string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns a collection of zero or more channel resources that
@@ -7057,6 +7211,14 @@
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 *ChannelsListCall) Context(ctx context.Context) *ChannelsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChannelsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7100,6 +7262,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7208,6 +7373,7 @@
part string
channel *Channel
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a channel's metadata. Note that this method currently
@@ -7243,6 +7409,14 @@
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 *ChannelsUpdateCall) Context(ctx context.Context) *ChannelsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ChannelsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.channel)
@@ -7265,6 +7439,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7325,6 +7502,7 @@
part string
commentthread *CommentThread
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a new top-level comment. To add a reply to an
@@ -7344,6 +7522,14 @@
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 *CommentThreadsInsertCall) Context(ctx context.Context) *CommentThreadsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentThreadsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.commentthread)
@@ -7363,6 +7549,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7415,6 +7604,7 @@
s *Service
part string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns a list of comment threads that match the API request
@@ -7556,6 +7746,14 @@
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 *CommentThreadsListCall) Context(ctx context.Context) *CommentThreadsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentThreadsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7599,6 +7797,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7732,6 +7933,7 @@
part string
commentthread *CommentThread
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Modifies the top-level comment in a comment thread.
@@ -7750,6 +7952,14 @@
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 *CommentThreadsUpdateCall) Context(ctx context.Context) *CommentThreadsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentThreadsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.commentthread)
@@ -7769,6 +7979,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7821,6 +8034,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a comment.
@@ -7838,6 +8052,14 @@
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 *CommentsDeleteCall) Context(ctx context.Context) *CommentsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -7851,6 +8073,9 @@
req, _ := http.NewRequest("DELETE", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7894,6 +8119,7 @@
part string
comment *Comment
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a reply to an existing comment. Note: To create a
@@ -7913,6 +8139,14 @@
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 *CommentsInsertCall) Context(ctx context.Context) *CommentsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.comment)
@@ -7932,6 +8166,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -7984,6 +8221,7 @@
s *Service
part string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns a list of comments that match the API request
@@ -8058,6 +8296,14 @@
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 *CommentsListCall) Context(ctx context.Context) *CommentsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8086,6 +8332,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8173,6 +8422,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// MarkAsSpam: Expresses the caller's opinion that one or more comments
@@ -8191,6 +8441,14 @@
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 *CommentsMarkAsSpamCall) Context(ctx context.Context) *CommentsMarkAsSpamCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsMarkAsSpamCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8204,6 +8462,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8247,6 +8508,7 @@
id string
moderationStatus string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// SetModerationStatus: Sets the moderation status of one or more
@@ -8279,6 +8541,14 @@
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 *CommentsSetModerationStatusCall) Context(ctx context.Context) *CommentsSetModerationStatusCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsSetModerationStatusCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8296,6 +8566,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8362,6 +8635,7 @@
part string
comment *Comment
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Modifies a comment.
@@ -8380,6 +8654,14 @@
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 *CommentsUpdateCall) Context(ctx context.Context) *CommentsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *CommentsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.comment)
@@ -8399,6 +8681,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8451,6 +8736,7 @@
s *Service
part string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns a list of categories that can be associated with
@@ -8494,6 +8780,14 @@
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 *GuideCategoriesListCall) Context(ctx context.Context) *GuideCategoriesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GuideCategoriesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8516,6 +8810,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8584,6 +8881,7 @@
s *Service
part string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns a list of application languages that the YouTube
@@ -8609,6 +8907,14 @@
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 *I18nLanguagesListCall) Context(ctx context.Context) *I18nLanguagesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *I18nLanguagesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8625,6 +8931,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8683,6 +8992,7 @@
s *Service
part string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns a list of content regions that the YouTube website
@@ -8708,6 +9018,14 @@
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 *I18nRegionsListCall) Context(ctx context.Context) *I18nRegionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *I18nRegionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8724,6 +9042,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8783,6 +9104,7 @@
id string
part string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Bind: Binds a YouTube broadcast to a stream or removes an existing
@@ -8857,6 +9179,14 @@
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 *LiveBroadcastsBindCall) Context(ctx context.Context) *LiveBroadcastsBindCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LiveBroadcastsBindCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -8880,6 +9210,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -8953,6 +9286,7 @@
id string
part string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// BindDirect: Binds a YouTube broadcast to a stream or removes an
@@ -9027,6 +9361,14 @@
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 *LiveBroadcastsBindDirectCall) Context(ctx context.Context) *LiveBroadcastsBindDirectCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LiveBroadcastsBindDirectCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9050,6 +9392,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9123,6 +9468,7 @@
id string
part string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Control: Controls the settings for a slate that can be displayed in
@@ -9223,6 +9569,14 @@
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 *LiveBroadcastsControlCall) Context(ctx context.Context) *LiveBroadcastsControlCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LiveBroadcastsControlCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9252,6 +9606,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9336,6 +9693,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a broadcast.
@@ -9397,6 +9755,14 @@
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 *LiveBroadcastsDeleteCall) Context(ctx context.Context) *LiveBroadcastsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LiveBroadcastsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9416,6 +9782,9 @@
req, _ := http.NewRequest("DELETE", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9470,6 +9839,7 @@
part string
livebroadcast *LiveBroadcast
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a broadcast.
@@ -9532,6 +9902,14 @@
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 *LiveBroadcastsInsertCall) Context(ctx context.Context) *LiveBroadcastsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LiveBroadcastsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.livebroadcast)
@@ -9557,6 +9935,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9620,6 +10001,7 @@
s *Service
part string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns a list of YouTube broadcasts that match the API request
@@ -9731,6 +10113,14 @@
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 *LiveBroadcastsListCall) Context(ctx context.Context) *LiveBroadcastsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LiveBroadcastsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9765,6 +10155,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -9869,6 +10262,7 @@
id string
part string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Transition: Changes the status of a YouTube live broadcast and
@@ -9938,6 +10332,14 @@
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 *LiveBroadcastsTransitionCall) Context(ctx context.Context) *LiveBroadcastsTransitionCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LiveBroadcastsTransitionCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -9959,6 +10361,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10044,6 +10449,7 @@
part string
livebroadcast *LiveBroadcast
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a broadcast. For example, you could modify the
@@ -10108,6 +10514,14 @@
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 *LiveBroadcastsUpdateCall) Context(ctx context.Context) *LiveBroadcastsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LiveBroadcastsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.livebroadcast)
@@ -10133,6 +10547,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10196,6 +10613,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a video stream.
@@ -10257,6 +10675,14 @@
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 *LiveStreamsDeleteCall) Context(ctx context.Context) *LiveStreamsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LiveStreamsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10276,6 +10702,9 @@
req, _ := http.NewRequest("DELETE", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10330,6 +10759,7 @@
part string
livestream *LiveStream
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a video stream. The stream enables you to send your
@@ -10394,6 +10824,14 @@
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 *LiveStreamsInsertCall) Context(ctx context.Context) *LiveStreamsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LiveStreamsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.livestream)
@@ -10419,6 +10857,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10482,6 +10923,7 @@
s *Service
part string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns a list of video streams that match the API request
@@ -10579,6 +11021,14 @@
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 *LiveStreamsListCall) Context(ctx context.Context) *LiveStreamsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LiveStreamsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10610,6 +11060,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10696,6 +11149,7 @@
part string
livestream *LiveStream
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a video stream. If the properties that you want to
@@ -10760,6 +11214,14 @@
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 *LiveStreamsUpdateCall) Context(ctx context.Context) *LiveStreamsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *LiveStreamsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.livestream)
@@ -10785,6 +11247,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10848,6 +11313,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a playlist item.
@@ -10865,6 +11331,14 @@
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 *PlaylistItemsDeleteCall) Context(ctx context.Context) *PlaylistItemsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlaylistItemsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -10878,6 +11352,9 @@
req, _ := http.NewRequest("DELETE", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -10923,6 +11400,7 @@
part string
playlistitem *PlaylistItem
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Adds a resource to a playlist.
@@ -10959,6 +11437,14 @@
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 *PlaylistItemsInsertCall) Context(ctx context.Context) *PlaylistItemsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlaylistItemsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.playlistitem)
@@ -10981,6 +11467,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11040,6 +11529,7 @@
s *Service
part string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns a collection of playlist items that match the API
@@ -11120,6 +11610,14 @@
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 *PlaylistItemsListCall) Context(ctx context.Context) *PlaylistItemsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlaylistItemsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -11151,6 +11649,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11239,6 +11740,7 @@
part string
playlistitem *PlaylistItem
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Modifies a playlist item. For example, you could update the
@@ -11258,6 +11760,14 @@
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 *PlaylistItemsUpdateCall) Context(ctx context.Context) *PlaylistItemsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlaylistItemsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.playlistitem)
@@ -11277,6 +11787,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11331,6 +11844,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a playlist.
@@ -11366,6 +11880,14 @@
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 *PlaylistsDeleteCall) Context(ctx context.Context) *PlaylistsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlaylistsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -11382,6 +11904,9 @@
req, _ := http.NewRequest("DELETE", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11432,6 +11957,7 @@
part string
playlist *Playlist
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a playlist.
@@ -11494,6 +12020,14 @@
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 *PlaylistsInsertCall) Context(ctx context.Context) *PlaylistsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlaylistsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.playlist)
@@ -11519,6 +12053,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11583,6 +12120,7 @@
s *Service
part string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns a collection of playlists that match the API request
@@ -11697,6 +12235,14 @@
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 *PlaylistsListCall) Context(ctx context.Context) *PlaylistsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlaylistsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -11734,6 +12280,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11831,6 +12380,7 @@
part string
playlist *Playlist
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Modifies a playlist. For example, you could change a
@@ -11868,6 +12418,14 @@
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 *PlaylistsUpdateCall) Context(ctx context.Context) *PlaylistsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *PlaylistsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.playlist)
@@ -11890,6 +12448,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -11949,6 +12510,7 @@
s *Service
part string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns a collection of search results that match the query
@@ -12369,6 +12931,14 @@
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 *SearchListCall) Context(ctx context.Context) *SearchListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SearchListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -12472,6 +13042,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12804,6 +13377,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a subscription.
@@ -12821,6 +13395,14 @@
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 *SubscriptionsDeleteCall) Context(ctx context.Context) *SubscriptionsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -12834,6 +13416,9 @@
req, _ := http.NewRequest("DELETE", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12879,6 +13464,7 @@
part string
subscription *Subscription
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Adds a subscription for the authenticated user's channel.
@@ -12897,6 +13483,14 @@
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 *SubscriptionsInsertCall) Context(ctx context.Context) *SubscriptionsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.subscription)
@@ -12916,6 +13510,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -12970,6 +13567,7 @@
s *Service
part string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns subscription resources that match the API request
@@ -13103,6 +13701,14 @@
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 *SubscriptionsListCall) Context(ctx context.Context) *SubscriptionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *SubscriptionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13146,6 +13752,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13266,8 +13875,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Set: Uploads a custom video thumbnail to YouTube and sets it for a
@@ -13305,10 +13914,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *ThumbnailsSetCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *ThumbnailsSetCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -13333,6 +13944,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *ThumbnailsSetCall) Context(ctx context.Context) *ThumbnailsSetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ThumbnailsSetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13371,6 +13992,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13470,6 +14094,7 @@
s *Service
part string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns a list of abuse reasons that can be used for reporting
@@ -13495,6 +14120,14 @@
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 *VideoAbuseReportReasonsListCall) Context(ctx context.Context) *VideoAbuseReportReasonsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VideoAbuseReportReasonsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13511,6 +14144,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13568,6 +14204,7 @@
s *Service
part string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns a list of categories that can be associated with
@@ -13610,6 +14247,14 @@
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 *VideoCategoriesListCall) Context(ctx context.Context) *VideoCategoriesListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VideoCategoriesListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13632,6 +14277,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13700,6 +14348,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a YouTube video.
@@ -13736,6 +14385,14 @@
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 *VideosDeleteCall) Context(ctx context.Context) *VideosDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VideosDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13752,6 +14409,9 @@
req, _ := http.NewRequest("DELETE", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13801,6 +14461,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// GetRating: Retrieves the ratings that the authorized user gave to a
@@ -13837,6 +14498,14 @@
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 *VideosGetRatingCall) Context(ctx context.Context) *VideosGetRatingCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VideosGetRatingCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -13853,6 +14522,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -13913,8 +14585,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Insert: Uploads a video to YouTube and optionally sets the video's
@@ -14007,10 +14679,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *VideosInsertCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *VideosInsertCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -14035,6 +14709,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *VideosInsertCall) Context(ctx context.Context) *VideosInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VideosInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.video)
@@ -14088,6 +14772,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14210,6 +14897,7 @@
s *Service
part string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns a list of videos that match the API request parameters.
@@ -14344,6 +15032,14 @@
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 *VideosListCall) Context(ctx context.Context) *VideosListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VideosListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -14387,6 +15083,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14509,6 +15208,7 @@
id string
rating string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Rate: Add a like or dislike rating to a video or remove a rating from
@@ -14528,6 +15228,14 @@
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 *VideosRateCall) Context(ctx context.Context) *VideosRateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VideosRateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -14542,6 +15250,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14603,6 +15314,7 @@
s *Service
videoabusereport *VideoAbuseReport
opt_ map[string]interface{}
+ ctx_ context.Context
}
// ReportAbuse: Report abuse for a video.
@@ -14638,6 +15350,14 @@
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 *VideosReportAbuseCall) Context(ctx context.Context) *VideosReportAbuseCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VideosReportAbuseCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.videoabusereport)
@@ -14659,6 +15379,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14703,6 +15426,7 @@
part string
video *Video
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Updates a video's metadata.
@@ -14740,6 +15464,14 @@
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 *VideosUpdateCall) Context(ctx context.Context) *VideosUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *VideosUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.video)
@@ -14762,6 +15494,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -14825,8 +15560,8 @@
media_ io.Reader
resumable_ googleapi.SizeReaderAt
mediaType_ string
- ctx_ context.Context
protocol_ string
+ ctx_ context.Context
}
// Set: Uploads a watermark image to YouTube and sets it for a channel.
@@ -14863,10 +15598,12 @@
return c
}
-// ResumableMedia specifies the media to upload in chunks and can be cancelled with ctx.
+// ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.
// At most one of Media and ResumableMedia may be set.
// mediaType identifies the MIME media type of the upload, such as "image/png".
// If mediaType is "", it will be auto-detected.
+// The provided ctx will supersede any context previously provided to
+// the Context method.
func (c *WatermarksSetCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *WatermarksSetCall {
c.ctx_ = ctx
c.resumable_ = io.NewSectionReader(r, 0, size)
@@ -14891,6 +15628,16 @@
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.
+// This context will supersede any context previously provided to
+// the ResumableMedia method.
+func (c *WatermarksSetCall) Context(ctx context.Context) *WatermarksSetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *WatermarksSetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.invideobranding)
@@ -14932,6 +15679,9 @@
req.Header.Set("Content-Type", ctype)
}
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -15027,6 +15777,7 @@
s *Service
channelId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Unset: Deletes a channel's watermark image.
@@ -15062,6 +15813,14 @@
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 *WatermarksUnsetCall) Context(ctx context.Context) *WatermarksUnsetCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *WatermarksUnsetCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -15078,6 +15837,9 @@
req, _ := http.NewRequest("POST", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/youtubeanalytics/v1/youtubeanalytics-gen.go b/youtubeanalytics/v1/youtubeanalytics-gen.go
index b813988..dc104db 100644
--- a/youtubeanalytics/v1/youtubeanalytics-gen.go
+++ b/youtubeanalytics/v1/youtubeanalytics-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "youtubeAnalytics:v1"
const apiName = "youtubeAnalytics"
@@ -352,6 +352,7 @@
s *Service
onBehalfOfContentOwner string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of available batch report definitions.
@@ -369,6 +370,14 @@
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 *BatchReportDefinitionsListCall) Context(ctx context.Context) *BatchReportDefinitionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BatchReportDefinitionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -382,6 +391,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -433,6 +445,7 @@
batchReportDefinitionId string
onBehalfOfContentOwner string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of processed batch reports.
@@ -451,6 +464,14 @@
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 *BatchReportsListCall) Context(ctx context.Context) *BatchReportsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BatchReportsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -465,6 +486,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -522,6 +546,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Removes an item from a group.
@@ -557,6 +582,14 @@
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 *GroupItemsDeleteCall) Context(ctx context.Context) *GroupItemsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupItemsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -573,6 +606,9 @@
req, _ := http.NewRequest("DELETE", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -621,6 +657,7 @@
s *Service
groupitem *GroupItem
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a group item.
@@ -656,6 +693,14 @@
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 *GroupItemsInsertCall) Context(ctx context.Context) *GroupItemsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupItemsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.groupitem)
@@ -677,6 +722,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -726,6 +774,7 @@
s *Service
groupId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns a collection of group items that match the API request
@@ -762,6 +811,14 @@
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 *GroupItemsListCall) Context(ctx context.Context) *GroupItemsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupItemsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -778,6 +835,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -835,6 +895,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a group.
@@ -870,6 +931,14 @@
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 *GroupsDeleteCall) Context(ctx context.Context) *GroupsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -886,6 +955,9 @@
req, _ := http.NewRequest("DELETE", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -934,6 +1006,7 @@
s *Service
group *Group
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a group.
@@ -969,6 +1042,14 @@
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 *GroupsInsertCall) Context(ctx context.Context) *GroupsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
@@ -990,6 +1071,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1038,6 +1122,7 @@
type GroupsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns a collection of groups that match the API request
@@ -1092,6 +1177,14 @@
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 *GroupsListCall) Context(ctx context.Context) *GroupsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1113,6 +1206,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1171,6 +1267,7 @@
s *Service
group *Group
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Modifies a group. For example, you could change a group's
@@ -1207,6 +1304,14 @@
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 *GroupsUpdateCall) Context(ctx context.Context) *GroupsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
@@ -1228,6 +1333,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1280,6 +1388,7 @@
endDate string
metrics string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Query: Retrieve your YouTube Analytics reports.
@@ -1360,6 +1469,14 @@
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 *ReportsQueryCall) Context(ctx context.Context) *ReportsQueryCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsQueryCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1394,6 +1511,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
diff --git a/youtubeanalytics/v1beta1/youtubeanalytics-gen.go b/youtubeanalytics/v1beta1/youtubeanalytics-gen.go
index d68b19a..f8fe547 100644
--- a/youtubeanalytics/v1beta1/youtubeanalytics-gen.go
+++ b/youtubeanalytics/v1beta1/youtubeanalytics-gen.go
@@ -15,6 +15,7 @@
"errors"
"fmt"
"golang.org/x/net/context"
+ "golang.org/x/net/context/ctxhttp"
"google.golang.org/api/googleapi"
"io"
"net/http"
@@ -34,7 +35,6 @@
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
-var _ = context.Background
const apiId = "youtubeAnalytics:v1beta1"
const apiName = "youtubeAnalytics"
@@ -352,6 +352,7 @@
s *Service
onBehalfOfContentOwner string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of available batch report definitions.
@@ -369,6 +370,14 @@
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 *BatchReportDefinitionsListCall) Context(ctx context.Context) *BatchReportDefinitionsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BatchReportDefinitionsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -382,6 +391,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -433,6 +445,7 @@
batchReportDefinitionId string
onBehalfOfContentOwner string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Retrieves a list of processed batch reports.
@@ -451,6 +464,14 @@
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 *BatchReportsListCall) Context(ctx context.Context) *BatchReportsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *BatchReportsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -465,6 +486,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -522,6 +546,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Removes an item from a group.
@@ -557,6 +582,14 @@
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 *GroupItemsDeleteCall) Context(ctx context.Context) *GroupItemsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupItemsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -573,6 +606,9 @@
req, _ := http.NewRequest("DELETE", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -621,6 +657,7 @@
s *Service
groupitem *GroupItem
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a group item.
@@ -656,6 +693,14 @@
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 *GroupItemsInsertCall) Context(ctx context.Context) *GroupItemsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupItemsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.groupitem)
@@ -677,6 +722,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -726,6 +774,7 @@
s *Service
groupId string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns a collection of group items that match the API request
@@ -762,6 +811,14 @@
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 *GroupItemsListCall) Context(ctx context.Context) *GroupItemsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupItemsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -778,6 +835,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -835,6 +895,7 @@
s *Service
id string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Delete: Deletes a group.
@@ -870,6 +931,14 @@
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 *GroupsDeleteCall) Context(ctx context.Context) *GroupsDeleteCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -886,6 +955,9 @@
req, _ := http.NewRequest("DELETE", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -934,6 +1006,7 @@
s *Service
group *Group
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Insert: Creates a group.
@@ -969,6 +1042,14 @@
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 *GroupsInsertCall) Context(ctx context.Context) *GroupsInsertCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsInsertCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
@@ -990,6 +1071,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1038,6 +1122,7 @@
type GroupsListCall struct {
s *Service
opt_ map[string]interface{}
+ ctx_ context.Context
}
// List: Returns a collection of groups that match the API request
@@ -1092,6 +1177,14 @@
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 *GroupsListCall) Context(ctx context.Context) *GroupsListCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsListCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1113,6 +1206,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1171,6 +1267,7 @@
s *Service
group *Group
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Update: Modifies a group. For example, you could change a group's
@@ -1207,6 +1304,14 @@
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 *GroupsUpdateCall) Context(ctx context.Context) *GroupsUpdateCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *GroupsUpdateCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
@@ -1228,6 +1333,9 @@
googleapi.SetOpaque(req.URL)
req.Header.Set("Content-Type", ctype)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}
@@ -1280,6 +1388,7 @@
endDate string
metrics string
opt_ map[string]interface{}
+ ctx_ context.Context
}
// Query: Retrieve your YouTube Analytics reports.
@@ -1360,6 +1469,14 @@
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 *ReportsQueryCall) Context(ctx context.Context) *ReportsQueryCall {
+ c.ctx_ = ctx
+ return c
+}
+
func (c *ReportsQueryCall) doRequest(alt string) (*http.Response, error) {
var body io.Reader = nil
params := make(url.Values)
@@ -1394,6 +1511,9 @@
req, _ := http.NewRequest("GET", urls, body)
googleapi.SetOpaque(req.URL)
req.Header.Set("User-Agent", c.s.userAgent())
+ if c.ctx_ != nil {
+ return ctxhttp.Do(c.ctx_, c.s.client, req)
+ }
return c.s.client.Do(req)
}